In my game, it gives me a warning Workspace.Admin:2: attempt to index field 'Parent' (a nil value)
local GUI = script.Parent.Parent; local player = GUI.Parent.Parent; local user = player.Character; local cam = workspace.CurrentCamera;
I hope that someone could help me.
If you are using a local script, instead of defining the player by GUI.Parent.Parent, define the player as a LocalPlayer, and I see that on line 3 of your's, you're defining the player's character. What if the player's character was never loaded?
local player = game.Players.LocalPlayer local character = player.CharacterAdded:Wait() or player.Character