local plr=game.Players.LocalPlayerlocal cam=game.Workspace.CurrentCameralocal mouse=plr:GetMouse()cam.CameraType="Scriptable"cam.CameraSubject=game.Workspacewhile wait() do regional 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 really glitchy how deserve to I fix that?You have the right to see for you yourself here:http://www.roblox.com/games/315301083/Minigames

You are watching: Cube eat cube games

You can just 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 come vote

Answered by
TheDeadlyPanther 2458

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

5 years earlier

This is a suggestion of a different method to resolve it:

You might use camera.CoordinateFrame, i m sorry is basically transforming where the camera is positioned, and where that is looking. It supplies CFrame.E.G:

local cam = game.Workspace.CurrentCamera-- inserts a component to look atlocal part = Instance.new("Part",game.Workspace)part.Anchored = truepart.BrickColor = BrickColor.new("Really black")part.Position = Vector3.new(0,10,0)-- if loop to adjust where the camera is facingwhile wait() execute cam.CoordinateFrame = CFrame.new(game.Workspace.Baseplate.Position,part.Position)endCFrame worths basically go favor this:

Argument #1:

Vector3 value, position of the camera, in the manuscript above, it provides the position of the camera the exact same as Baseplate"s position.

Argument #2:

Vector3 value, what the camera is feather at, in the script above, that is looking at the black Part.

For much more info on CFrame: http://wiki.roblox.com/index.php/CFrame

When trying to be over a component that is moving, you require to have actually the very first argument the CoordinateFrame"s CFrame to be in the same position of the component that is moving, so you can always see it, and that it is in the center of the screen.Like so:

local ns = game.Workspace.TestPartp.Anchored = truelocal cam = game.Workspace.CurrentCamerawhile wait(.01) execute p.Position = p.Position + Vector3.new(0.01,0,0) -- move it ~ above the X axis. Cam.CoordinateFrame = CFrame.new(p.Position + Vector3.new(0,10,0),p.Position )endThis manuscript should relocate a part on the X axis every hundredth the a second, and also make the camera look in ~ the Part.Also, the factor I am including to the CoordinateFrame"s very first argument is since I want to watch the Part, no look at it while within the part (which is usually impossible).