Instead of having to do
script.Parent.Parent.Parent.Parent.Character
in a gui to get the player, is there another method which is more efficient?
All scripts in the PlayerGui should be local, so therefore you can use LocalPlayer
.
local plr = game.Players.LocalPlayer local char = plr.Character or plr.CharacterAdded:Wait()
plr.CharacterAdded:Wait()
: This will make sure the character has loaded.