Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My capture the flag script doesnt work? Please help, all help is appreciated

Asked by
Fako16 13
5 years ago

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)
0
Line 1 is cut off User#19524 175 — 5y

Answer this question