Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

One function works but not the next?

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

2 comments

0

Is this in a LocalScript or a normal script?

0

normal

1 answer

✓ Accepted answer

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

line 11-12 m.Parent = workspace

2 comments

0

Wow you're good.Thanks again :)

0

no problem.

This discussion is preserved as it was. New answers, comments, and votes are closed.