Quantcast

How would I make the player's camera tilt like in Sinking Ship?

I know this is a complex question, but I can’t seem to figure it all out.

It’s clearly in the LocalEventScript, and I’m using it for an upcoming map project.

If anyone is able to help me here, it would be greatly appreciated! :slight_smile:

Just watch the tutorial made by HenryDO9. It doesn’t even require LocalEventScript, but uses welds which might break the map.

that’s the sinking ship tilt… not the camera movement in sinking ship…

1 Like

Oh okay

–Edited Version

–Script Potential to work nicely
–Paste the script below into a local script

local Distance = 5 --How much you would like it to rotate

local Speed = 0.50693583746 --How much speed you would like it to be

local Camera = workspace.Camera --Player’s Camera

local RunService = game:GetService(‘RunService’) --Run Service

while true do --Where the magic happens

RunService.RenderStepped:Wait()

  Camera.CoordinateFrame = Camera.CoordinateFrame * CFrame.Angles(0, 0, math.rad(Distance * 
  math.sin(tick() * Speed)))

end

1 Like

Since my post 3 months ago somehow didn’t work, heres the 3 month late script xdd

local dist, speed, cam, rs = 5, 0.5, workspace.CurrentCamera, game:GetService("RunService")

while rs.RenderStepped:Wait() do
  cam.CFrame = cam.CoordinateFrame * CFrame.Angles(0, 0, math.rad(dist * 
  math.sin(tick() * speed)))
end

Ta da, there u go @coolzak35, it’s most likely this or the ship tilting in game

1 Like

HOW DARE YOU TAKE MY SCRIPT…
YOU COPIER.

meanie

since ur script had a little error, heres a fix

local dist, speed, cam, rs = 5, 0.5, workspace.CurrentCamera, game:GetService("RunService")

while rs.RenderStepped:Wait() do
  cam.CFrame = cam.CoordinateFrame * CFrame.Angles(0, 0, math.rad(dist * math.sin(tick() * speed)))
end

(to make it faster, increase the number that says 0.5 in the script. the bigger the number, the faster)

if anyone wants to use this in a game not an fe2 map, put it in a localscript in StarterPlayerScripts
image


(2x speed)

2 Likes

and heres me playing sugar rush with the distance set to 50

Oh thank you for fixing it!

1 Like

Wait, what if we do math.cos() or math.tan() instead of sin(), I know something weird will happen with tangents because the graphs of them are really weird

1 Like

Also, what’s the font you use on your script editor? It looks really nice

1 Like

its the roblox scifi font aka Zekton RG

K thank you!

1 Like

Thanks a bunch to both you and @Kriscross102RBLX. I completely forgot this thread even existed, but I appreciate the help a lot!

no problem!

Your Welcome!
@Kriscross102RBLX
Thanks for fixing my error

he didnt take it. he modified it to make it work even though it failed ol

also welcome

He didn’t take your script fyi. Get some help.

1 Like