Client Script:
--Camera moves around function
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = CFrame.new() * CFrame.Angles(0, 0, 0)
local function updatecamerapos()
camera.CFrame = camerafollow.CFrame
camera.CFrame = camera.CFrame * CFrame.Angles(math.rad(tilt),0,0)
end
tool.Equipped:Connect(function()
--set debounce
loopdebounce = true
--camera moves around
runservice:BindToRenderStep("updatecamerapos", Enum.RenderPriority.Camera.Value + 1, updatecamerapos)
end)
Server Script:
local camera = game.Workspace.CurrentCamera
local center = workspace.AC130_Workspace.FollowPart
local camerafollow = game.Workspace.AC130_Workspace.MainPart
local runservice = game:GetService("RunService")
--settings
local angle = 0
local speed = 0.5
local offset = CFrame.new(0,0,100)
--
local function updatepart()
camerafollow.CFrame = center.CFrame * CFrame.Angles(0,math.rad(angle),0) * offset
angle += 1
print(camerafollow.CFrame)
end
runservice.Stepped:Connect(function()
updatepart()
end)
when i run the game and equip the tool, theres this wacky ass glitchy effect. i dont understand why its happening. the server and client scripts are above. i think it might be because RenderStep and Stepped are slighty off, but im not sure.
** You are now Level 4! **