So, I'm making this system when a player steps underneath the flag, he starts capturing it, now to make sure who's capturing it, the flag has a little box that says the players name and this should be the script that'd trigger that to say the player's name in box, but it doesn't work, please help.
local FlagText = script.Parent.Parent.CharacterDisplayPart.SurfaceGui.FlagFrame:WaitForChild("FlagText").Text -- When you load into studio it loads instantly, but when you load into game it takes several seconds, this is so it works both in studio and game script.Parent.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if hit then FlagText = player.Name end end)