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

GUIScript not working in player?

Asked by 8 years ago
Edited 7 years ago

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)
0
Additional notes of this script: FilteringEnabled is enabled. Script is inside a Server Script. M39a9am3R 3210 — 8y
0
How about trying to put an if statement on the very top(in the function) which goes something like this.... if player then KingLoneCat 2642 — 8y

1 answer

Log in to vote
0
Answered by 7 years ago

Put a statement at the top.

Ad

Answer this question