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

How do I make a GUI text label say when the owner is there and when the owner is not there?

Asked by 5 years ago
Edited 5 years ago
game.Players.PlayerAdded:Connect(function(plr)
    if plr.Name == "CTGM_DEV" then
        script.Parent.TextLabel.Text = "Owner is here!"
    else
        script.Parent.TextLabel.Text = "Owner is not here."
    end
end)

1 answer

Log in to vote
1
Answered by
TopBagon 109
5 years ago

Try this maybe... I'm on mobile so not entirely sure if that's correct

local textLabel = script.Parent:WaitForChild("TextLabel")
local text = "Owner is not here."

for i,v in pairs(game.Players:GetChildren()) do
    if v.Name == "CTGM_DEV" then
        text = "Owner is here!"
    else
        text = "Owner is not here."
    end
end


textLabel.Text = text
0
Thanks! C0nn0r_DevCT 42 — 5y
Ad

Answer this question