Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

attempt to index global 'player' (a nil value) error , how to fix ?

player.PlayerGui.ScreenGui.Frame.Visible=false
player.PlayerGui.ScreenGui.ARROW.Visible=false
player.PlayerGui.ScreenGui.CONVERSION.Visible=false

I did this and this error showed up at the output

2 comments

0

Did you define 'player' what is it defined as, is this a localscript? Serverscript? You haven't explained or showed us anything

0

Oh ok , next time I will ... Thx

1 answer

✓ Accepted answer

You have to define the Player. The way to do this in a local script would be:

Players = game:GetService("Players")
local Player = Players.LocalPlayer

Hope this helps.

This discussion is preserved as it was. New answers, comments, and votes are closed.