Notes:
This is a local script inside A text label inside guis
NO Filtering Enabled
local BattleFrame = script.Parent.Parent:WaitForChild('BattleFrame') local IntroText = script.Parent local W = 0.07 local BlurEffect = game.Lighting:WaitForChild('Blur') local AOP = game.ReplicatedStorage:WaitForChild('AmountOfPlayers') game.Players.PlayerAdded:Connect(function() wait() if game.Players.NumPlayers == 1 then BlurEffect.Size = 24 IntroText.Visible = true wait(2) IntroText.Text = 'Need one more player!' wait(5) IntroText.Text = 'Loading.' wait(1) IntroText.Text = 'Loading..' wait(1) IntroText.Text = 'Loading...' wait(2) IntroText.Text = 'Need one more player!' wait(5) IntroText.Text = 'Waiting...' game.Players.NumPlayers.Changed:Connect(function() if AOP.Value == 2 then wait(3) IntroText.Text = 'Ready?' wait(3) IntroText.Text = 'Set?' wait(3) IntroText.Text = 'FIGHT!' wait(3) IntroText.Visible = false BlurEffect.Size = 0 wait(W) BattleFrame.Visible = true end end) end end)
[PROBLEM]; When joining the game, nothing runs. No blue, no text label, no nothing. So I need to know why this isn't running and how to fix it.
If you wanna try yourself;
NOTE
- When you join, there's suppose to be a blue with a text label in the center saying "Loading". But nothing happens
https://web.roblox.com/games/975537457/Red-V-S-Blue-Tower-Defense-BETA-TESTING
You have two player variables, you would not need the function. A playeradded function is only recommended for server scripts.
Instead of that function, try this function:
plr.PlayerAdded:connect(function() end)
Unless you use a server script, you would need to use the PlayerAdded event from the service Players
since server scripts cannot access LocalPlayer
.
If my answer helped you, please don't forget to accept it!
_____________________________
EDIT: Instead of having a value that checks for the amount of players available, use the service Players
instead as it has a property that can read the amount of players in the server.