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

GUIScript not working in player?

Works in studio, but not in player. This is a script in ServerScriptService

game.Players.PlayerAdded:connect(function(player)
	local text = player.PlayerGui:WaitForChild("PlayerJoined").TextLabel
	repeat
	
	text.Text = player.Name.." has joined the game!"
	local posy = text.AbsolutePosition.Y
	posy = posy + 1
	text.Position = UDim2.new(0.4,0, 0, posy)
	wait(0.015)
	until
	text.AbsolutePosition.Y == (0)
	wait(3)
	repeat	
	local posy = text.AbsolutePosition.Y	
	posy = posy - 1	
	text.Position = UDim2.new(0.4,0, 0, posy)	
	wait(0.015)	
	until
	text.AbsolutePosition.Y == (-100)
	text.Text = " "		
end)

2 comments

0

Additional notes of this script: FilteringEnabled is enabled. Script is inside a Server Script.

0

How about trying to put an if statement on the very top(in the function) which goes something like this.... if player then

1 answer

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