Why does this LocalScript only function once?
02 | local player = game.Players.LocalPlayer |
04 | local replicatedstorage = game:GetService( "ReplicatedStorage" ) |
05 | local roundtag = replicatedstorage:WaitForChild( "RoundTag" ) |
06 | local lighting = game:GetService( "Lighting" ) |
07 | local classes = lighting:WaitForChild( "Classes" ) |
08 | local laser = classes:WaitForChild( "Laser" ) |
09 | local rocket = classes:WaitForChild( "Rocket" ) |
11 | roundtag.Changed:connect( function () |
12 | if roundtag.Value = = true then |
13 | if player.Class.Value = = "Laser" then |
14 | player.StarterGear:ClearAllChildren() |
15 | local weapon = laser.Phaser |
16 | weapon:Clone().Parent = player.Backpack |
17 | weapon:Clone().Parent = player.StarterGear |
18 | elseif player.Class.Value = = "Rocket" then |
19 | player.StarterGear:ClearAllChildren() |
20 | local weapon = rocket.Launcher |
21 | weapon:Clone().Parent = player.Backpack |
22 | weapon:Clone().Parent = player.StarterGear |
How come this only works once? it gives the players guns on the first round but every round after it does nothing