I may have issues with scripts these times but I can not understand what's causing it. Anyways I have a problem with this script:
local infoLabel = game.StarterGui.ScreenGui.infoLabel game.Players.PlayerAdded:Connect(function(player) game.StarterPlayer.CharacterWalkSpeed = 0 infoLabel.Text = "Welcome to Player Experiments." wait(5) infoLabel.Text = "Lets start with your username." wait(5) infoLabel.Text = "Your username is ".. player.Name.. ". Right?" end)
It had to change the infoLabel
's text to "Lets start with your username" but instead it stayed at "Welcome to Player Experiments". It also doesn't go to "Your username is ".. player.Name.. ". Right?". I can't understand what is wrong here as there are no errors.
This will happen everytime the player respawns, they'll start from the beginning if they die.
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(Character) Character.Humanoid.WalkSpeed = 0 local PlayerGui = player:WaitForChild("PlayerGui") local ScreenGui = PlayerGui:WaitForChild("ScreenGui") local infoLabel = ScreenGui:WaitForChild("infoLabel") infoLabel.Text = "Welcome to Player Experiments." wait(5) infoLabel.Text = "Lets start with your username." wait(5) infoLabel.Text = "Your username is ".. player.Name.. ". Right?" end) end)
If you didn't want that then here, it'll only play the beginning part once:
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Wait() player.Character.Humanoid.WalkSpeed = 0 local PlayerGui = player:WaitForChild("PlayerGui") local ScreenGui = PlayerGui:WaitForChild("ScreenGui") local infoLabel = ScreenGui:WaitForChild("infoLabel") infoLabel.Text = "Welcome to Player Experiments." wait(5) infoLabel.Text = "Lets start with your username." wait(5) infoLabel.Text = "Your username is ".. player.Name.. ". Right?" end)