local plr=game.Players.LocalPlayerlocal cam=game.Workroom.CurrentCameraneighborhood mouse=plr:GetMouse()cam.CameraType="Scriptable"electronic camera.CameraSubject=game.Workspacewhile wait() do neighborhood cf=game.Workspace.CFrame.p regional size=game.Workspace.Position.y/2 game.Workspace.CFrame=CFrame.new(cf.x,size,cf.z)*CFrame.Angles(0,0,0) game.Workspace.Velo.velocity=(mouse.Hit.p-game.Workspace.Position)*Vector3.new(1.5,0,1.5) cam:Interpolate(game.Workspace.CFrame+Vector3.new(0,game.Workspace.Siz.Value*0.8+20,0),game.Workspace.CFrame,0.01) local val=game.Workspace:GetMass()*100 game.Workspace.Velo.MaxForce=Vector3.new(val,val*2,val)endIt is very glitchy how can I settle that?You deserve to check out for yourself here:http://www.roblox.com/games/315301083/Minigames




You are watching: Cube eat cube games

*
0
You can simply execute this: cam.CoordinateFrame = CFrame.new(game.Workspace.Position,game.Workspace.Position + Vector3.new(0,10,0), game.Workspace.Position) TheDeadlyPanther 2458 — 5y

1 answer


Log in to vote
0
*
*

Answered by
*
TheDeadlyPanther 2458
*
*



See more: The Beatles I Saw Her Standing There Bass Tab By The Beatles

5 years earlier

This is a tip of a different way to solve it:

You can use cam.CoordinateFrame, which is basically transforming wright here the electronic camera is positioned, and wright here it is looking. It provides CFrame.E.G:

neighborhood electronic camera = game.Workarea.CurrentCamera-- inserts a component to look atneighborhood part = Instance.new("Part",game.Workspace)component.Anchored = truecomponent.BrickColor = BrickColor.new("Really black")component.Position = Vector3.new(0,10,0)-- while loop to adjust wbelow the cam is facingwhile wait() execute camera.CoordinateFrame = CFrame.new(game.Workarea.Baseplate.Position,part.Position)endCFrame worths basically go favor this:

Argument #1:

Vector3 worth, place of the electronic camera, in the script over, it makes the place of the camera the very same as Baseplate"s position.

Argument #2:

Vector3 worth, what the video camera is looking at, in the script above, it is looking at the black Part.

For even more details on CFrame: http://wiki.roblox.com/index.php/CFrame

When trying to be above a component that is relocating, you should have the initially argument of CoordinateFrame"s CFrame to be in the same place of the part that is moving, so you can always view it, and also that it is in the center of the display screen.Like so:

regional p = game.Workroom.TestPartp.Anchored = truelocal video camera = game.Workspace.CurrentCamerawhile wait(.01) execute p.Position = p.Position + Vector3.new(0.01,0,0) -- moves it on the X axis. cam.CoordinateFrame = CFrame.new(p.Position + Vector3.new(0,10,0),p.Position )endThis manuscript need to move a Part on the X axis eextremely hundredth of a 2nd, and make the camera look at the Part.Also, the reason I am including to the CoordinateFrame"s initially argument is because I want to view the Part, not look at it while inside the Part (which is basically impossible).