Gamepass scripting help

I have a script in my game that flips the camera angle. I want a gamepass that would flip the camera back over, but I seem to have an issue scripting it. The Local Script is in StarterGUI.
local RotationSpeed = 0 game["Run Service"].RenderStepped:connect(function() workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(0,math.rad(RotationSpeed),9.5) end)

1 Like

Do you mean?

local RunService = game:GetService("RunService")
local RotationSpeed = 0

RunService.RenderStepped:Connect(function()
   workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame * CFrame.Angles(0,math.rad(RotationSpeed),9.5) end) 
end)
1 Like

either way, mine works. But I need a gamepass that basically deactivates the script.

1 Like

I have a kinda similar problem of this last week, and someone suggested that I should use a thing that can Bind and Unbind a RenderStepped.

Check this topic that I made and look for the Solution.
Check the lower link “this”

1 Like