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

Event won't trigger when a specific player joins?

So I'm trying to create a script that'll trigger an event when a specific player (myself) joins the game. (I'm not the best at scripting, so this might look a little bit messy or unefficient.)

local line = script.Parent:WaitForChild('line')
local nova = script.Parent:WaitForChild('rise')
local init = script.Parent:WaitForChild('long')
local screen = script.Parent
local force = script.Parent.force


game.Players.PlayerAdded:Connect(function(player)
	if player.Name == 'jetape' then
		script.Parent.Frame.Visible = true
script.Parent.ImageLabel.Visible = true
game.Workspace.Sound.Playing = true
wait(6)
line:TweenSize(UDim2.new(0, 1054,0, 3), "Out", "Quad", 1)
line.Visible = true
wait(1.5)
nova.Visible = true
nova:TweenPosition(UDim2.new(0.318, 0,0.4, 0), "InOut", "Sine", 0.5)
wait(2)
init.Visible = true
wait(2)
nova.Text = 'test'
init.Text = 'test'
wait(6)
line:TweenSize(UDim2.new(0, 0,0, 0), "Out", "Quad", 1)
wait(0.6)
nova.Visible = false
init.Visible = false
wait(0.2)
line.Visible = false
wait(1.8)
game.Workspace.Sound.Playing = false
game.Workspace.Sound:Destroy()
screen.ImageLabel.Visible = false
screen.Frame.Visible = false
	else
	print('Failed')
      end
end)


As far as I know, this should be working. I don't receive any errors. Any help would be greatly appreciated.

4 comments

0

It won't show for you, but it will show for other who joined before you.

0

What script is this local or server sided?

0

Do you want this to show for everyone?

0

I do want everything to show up for everyone, and it's a server script.

1 answer

✓ Accepted answer

If you put this script into Starter Gui then it won't work. I don't know where you have it but the script should be in Workspace, otherwise the function won't work. And Gui in Starter Gui (Of course change variables like: local line = game.StarterGui:WaitForChild"line").

3 comments

0

You mean : game.StarterGui:WaitForChild("line") ? Why wouldn't it work in StarterGui ? 

0

It should be player gui.

0

With a few tweaks this worked, cheers.

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