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

One function works but not the next?

Asked by
wjs3456 90
10 years ago

I know this is basic but I'm confused. The first function works but not the next, even though they are very similar. What happened?

function round(player,text,time)
Wait(3)
local m = Instance.new("Message",player.PlayerGui)
m.Text = text
wait(time)
m:Destroy()
end

function begin(text,time)
    Wait(1)
    local m= Instance.new("Message")
    m.Text = text
    wait(time)
    m:Destroy()
end

game.Players.PlayerAdded:connect(function(player)
workspace:WaitForChild(player.Name)
round(player,"The round will begin soon!",3)
end)

begin("Beginning the round now!",3)

Thanks

0
Is this in a LocalScript or a normal script? SlickPwner 534 — 10y
0
normal wjs3456 90 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago

set the parent of the message to workspace so it can be seen by all.

line 11-12 m.Parent = workspace

0
Wow you're good.Thanks again :) wjs3456 90 — 10y
0
no problem. TigerCaptain 75 — 10y
Ad

Answer this question