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.
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").