I don't get why this is happening. There's a local script parented to a server script, then parented to a vehicleseat. I'm trying to make an RC car. The first time the camera works good, but then the second time you use it, it just does not want to focus on the car. Why is this happening!? Serverscript:
print("Camera script loading") local newscript = script.CameraChange:Clone() script.Parent.ChildAdded:Connect(function(weld) if weld.Name == "SeatWeld" then local h = script.Parent.Occupant wait() if h.Sit == true then newscript.Parent = h.Parent end end end)
localscript:
Camera = game.Workspace.CurrentCamera Object = game.Workspace.HPIBlitz.HPIBlitz.Shell Player = script.Parent.Humanoid Camera.CameraSubject = Object Camera.CameraType=3 while wait() do if Player.Sit == false then Camera.CameraSubject = Player script:Destroy() end end
You're cloning it one time and then the localscript gets destroyed, that's why it only works one time, maybe try to clone the localscript after line 7 in your server script.