I made a Camera Script to where it spins around a part when you join. But I made this script that is below to when you press a gui button, the camera will be on your characters head. Does not work though. It stays spinning on the part.
script.Parent.MouseButton1Click:connect(function() local Player = game.Players.LocalPlayer local Char = Player.Character local Camera = game:GetService("Workspace").CurrentCamera while wait() do if script.Parent.Parent.TextBox.Text == "a123" then Camera.CameraSubject = Char:WaitForChild("Head") Camera.CameraType = "Attach" elseif script.Parent.Parent.TextBox.Text ~= "a123" then Player:Kick("The code you have entered is wrong.") end end end)
Try attaching it to a Humanoid, not the Head. Not sure, though.