Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to fix game on player join?

Asked by 9 years ago

I got this script right here. I was wondering if someone could make it so everytime a player joins it fixes the cam?

function buttondown()
game.Workspace.CurrentCamera:remove()
wait(.1)
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"
end

script.Parent.MouseButton1Down:connect(buttondown)

I also tried

function onPlayerEntered()
game.Workspace.CurrentCamera:remove()
wait(.1)
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"
end

game.Players.PlayerAdded:connect(onPlayerEntered)

it didn't work, it was a localscript in starterpack

Answer this question