I have a starter GUI that requires me to get a character using a non-local script, however I can't figure out how to get the player for the life of me.
I've tried
local name = script.(all the parents up to the player the starter gui is in).Name local player = game.Players.name
But I really don't know how else to go about it. Maybe something like
function onClicked () player = script.Parent.Click end
but that's obviously written really wrong and most likely doesn't work.
Maybe something with the 'GetPlayerFromCharacter' function or something with 'mouse1buttondown', but I don't really know.
If your script is designed to go in StaterGui/PlayerGui:
local Player = script; repeat Player = Player.Parent until Player.Parent == game.Players -- Player is now your Player.