Attempt to index nil with 'WaitForChild'

Nein, there are nil ways to get the local player on the server. You could add Player Parameters to the functions, then insert the player into the parameter when calling the function, you’d need to have the player sent through the parameter though. For example.

function Base.Setup(Player, Health, ui)
 local PlayerGui = Player.PlayerGui
 --stuff
end

I typed what you said to ai assistant (cuz im new and didnt understood it) and it gave me a code and that did worked C: so ty for your help :DD

1 Like