I have a script that tells you what the character is. But it says the character is a nil value. I think its because im using the script before the character is made but i dont know how to fix that.
Remember to use LocalScript
you can use CharacterAdded:Wait()
(this wait for character added.)
example:
local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait() -- Wait for character added
You can try this:
local player = game.Players.LocalPlayer local playergui = player:WaitForChild("PlayerGui") -- wait for player gui, for no errors local char = player.Character or player.CharacterAdded:Wait()
Wiki pages:
do not use
variable = value
uselocal variable = value
Hope it helped :)
this is the part where i got stuck
player = game.Players.LocalPlayer playergui = player.PlayerGui char = player.Character
how would i go about on fixing this because it ends up saying character is nil