The below script should check for a BoolValue called RoundTag in the ReplicatedStorage and it should check for when the tag changes. I have a main script which changes it to true when the games has started. When it is true though it dosent give the players their weapons. Please Help!
Script Location: game>StarterPack>LocalScript
local player = script.Parent.Parent
local serverstorage = game:GetService("ServerStorage")
local laser = serverstorage:WaitForChild("Classes"):WaitForChild("Laser")
local rocket = serverstorage:WaitForChild("Classes"):WaitForChild("Rocket")
local demo = serverstorage:WaitForChild("Classes"):WaitForChild("Demo")
local assault = serverstorage:WaitForChild("Classes"):WaitForChild("Assault")
game:GetService("ReplicatedStorage"):FindFirstChild("RoundTag").Changed:connect(function(value)
if value == true then
if player.Class.Value == "Laser" then
player.StarterGear:ClearAllChildren()
local weapon = laser.Phaser
weapon:Clone().Parent = player.Backpack
weapon:Clone().Parent = player.StarterGear
elseif player.Class.Value == "Rocket" then
player.StarterGear:ClearAllChildren()
local weapon = rocket.Launcher
weapon:Clone().Parent = player.Backpack
weapon:Clone().Parent = player.StarterGear
end
end
end)
EDIT Works in Solo but not on server

1 comment
thanks :D I got it working now +1