im making a main menu gui and when I test the game with my friend if he presses play on the gui then it stops working for me and continues to work for him and vice versa can anybody fix this btw this is the code
local player = game.Players.LocalPlayer
local cam = workspace.CurrentCamera
local starterCam = workspace:WaitForChild("playcam")
local playButton = script.Parent.playbutton
local main = script.Parent
repeat
cam.CameraType = Enum.CameraType.Scriptable
cam.CameraSubject = starterCam
cam.CFrame = starterCam.CFrame
until cam.CameraType == Enum.CameraType.Scriptable and cam.CameraSubject == starterCam and cam.CFrame == starterCam.CFrame
playButton.MouseButton1Click:Connect(function()
main.Enabled = false
cam.CameraType = Enum.CameraType.Custom
cam.CameraType = Enum.CameraType.Custom
cam.CameraSubject = player.Character
end)
** You are now Level 1! **