Hello, I need help with making a script that when you step on a part your camera turns in a circle shape, like this,
the ball in the middle is the player looking forward so its basically you zooming in first person and turning left. Can you help me make that script?
use a touched event, the players maxzoomdistance, a connection, and the Camera’s CFrame. Like this:
local part = --part
local plr = game.Players.LocalPlayer
local RS = game:GetService("RunService")
local normalmaxzoom = plr.CameraMaxZoomDistance
local connection
part.Touched:Connect(function(hit)
local touchedplr = game.Players:GetPlayerFromCharacter(hit.Parent)
if touchedplr == plr then
connection = RS.RenderStepped:Connect(function()
workspace.CurrentCamera.CFrame *= CFrame.Angles(0,0.01,0)
plr.CameraMaxZoomDistance = 0.5
end)
end
end)
part.TouchEnded:Connect(function(hit)
local touchedplr = game.Players:GetPlayerFromCharacter(hit.Parent)
if touchedplr == plr then
connection:Disconnect()
plr.CameraMaxZoomDistance = normalmaxzoom
end
end)