So I have a loading screen that appears when a player joins. For now I’m just making it stay on the screen so I can see if it appears when I join. But it doesn’t. Here’s the script.
1 | game.Players.PlayerAdded:Connect( function (player) |
2 | player.PlayerGui.Loading.Enabled = true |
3 | end ) |
Try removing line 1 and line 3, 'PlayerAdded' has never worked for me, and instead, just let the script run whenever it's ready (which is when you start the game). Instead, add a variable at the start of the script saying: player = game.Players.LocalPlayer; so that the script looks more like this:
1 | local player = game.Players.LocalPlayer |
2 |
3 | player.PlayerGui.Loading.Enabled = true |
You can make an easier Loading screen. You can make a screengui (and frame) and put this localscript: EDIT: Forgot to change the speed and jump power back xD
1 | local h = character:WaitForChild( "Humanoid" ) |
2 | h.jumpPower = 0 -- sets the jump power to 0 so the character can't jump |
3 | h.WalkSpeed = 0 -- sets the speed to 0 so the character can't move |
4 | wait( 7 ) -- wait 7 seconds |
5 | h.JumpPower = 50 -- considering you use the default jump power |
6 | h.WalkSpeed = 16 -- considering you use the default speed |
7 | script.Parent.Frame.Visible = false -- after 7 seconds, remove the loading screen |
you should estimate the seconds you have to wait by how big the game is (is it a big game or is it something like a small project?)
let me know if there are any problems!