Hello Everyone
I've been trying to create code where after an intermission time, a sword will be given to the player.
Here is a regular script (Not LocalScript) of the game loop that I made
Main = require(game.Workspace.ModuleScripts.Main)
local status = game.ReplicatedStorage:WaitForChild("Status")
local intermissionTime = 60
local roundTime = 120
local players = game.Players:GetPlayers()
local playerService = game.Players
local Number = intermissionTime
local sword = game.ServerStorage.Swords.BasicSword
while true do
for i = 1, intermissionTime, 1 do -- Countdown for intermission time
status.Value = "INTERMISSION (" .. Number .. ")"
wait(1)
Number = Number - 1
end
Number = roundTime
Main.ToBattleMap()
for i = 1, #players do -- Attempting to clone and parent the clone to the player's backpack
local player = players[i]
player.CharacterAdded:Connect(function(Player)
local backpack = player:WaitForChild("Backpack")
local swordClone = sword:Clone()
swordClone.Parent = backpack
end)
end
for i = 1, roundTime, 1 do -- Countdown for Round Time
status.Value = "ROUND IN PROGRESS (" .. Number .. ")"
wait(1)
Number = Number - 1
end
Main.ToLobbyMap()
Number = intermissionTime
end
When I run it, The tool won't show up after the intermission time is over, but no errors are shown in the output. Can someone please tell me what is happening and how to fix this so it will show up?
Thanks in advance :)

1 comment
from my experience you cant get tools from server storage maybe thats the problem? if it is try putting it in something else