New to scripting and just can't figure out how this works.
I have 3 gears in the StarterPack all as children of a Script. Here's my current code:
local gun = game.StarterPack.Script.HyperlaserGun
local squid = game.StarterPack.Script.SquidGun
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local player = game.Players.LocalPlayer
InRound.Changed:Connect(function()
if InRound.Value == true then
sword.Parent = player.Backpack
else
sword.Parent = game.StarterPack.Script
gun.Parent = game.StarterPack.Script
squid.Parent = game.StarterPack.Script
end
end)```
and it won't work. I added print statements to let me know if the code is being read. I'm getting the statements fine, but not the gears. Any ideas?
** You are now Level 2! **
