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
1game.Players.PlayerAdded:Connect(function(plr)
2    if plr.Name == "CTGM_DEV" then
3        script.Parent.TextLabel.Text = "Owner is here!"
4    else
5        script.Parent.TextLabel.Text = "Owner is not here."
6    end
7end)

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

01local textLabel = script.Parent:WaitForChild("TextLabel")
02local text = "Owner is not here."
03 
04for i,v in pairs(game.Players:GetChildren()) do
05    if v.Name == "CTGM_DEV" then
06        text = "Owner is here!"
07    else
08        text = "Owner is not here."
09    end
10end
11 
12 
13textLabel.Text = text
0
Thanks! C0nn0r_DevCT 42 — 5y
Ad

Answer this question