local replicatedstorage = game:GetService('ReplicatedStorage')
local replicatedstorage = game:GetService('ReplicatedStorage')
local status = replicatedstorage:WaitForChild('infoValue')
local mapstorage = game.Workspace.mapstorage
--[[
while true do
while game.Players.NumPlayers > 2 do
status.Value = 'Players Are Needed'
repeat wait(2) until game.Players.NumPlayers >= 2
end
]]
for i = 30,0,-1 do
status.Value = 'Intermission '..i
wait(1)
end
local mapsinserverstorage = game:GetService('ServerStorage'):GetChildren()
local chosenmap = mapsinserverstorage[math.random(1,#mapsinserverstorage)]
chosenmap:Clone().Parent = mapstorage
status.Value = 'Round Starting!'
wait(3)
local spawns = chosenmap:WaitForChild('spawns'):GetChildren()
for _, player in pairs(game.Players:GetPlayers())do
if player and #spawns > 0 then
local torso = player.Character:WaitForChild('Torso')
local allspawns = math.random(1,#spawns)
local randomspawns = spawns[allspawns]
if randomspawns and torso then
table.remove(spawns,allspawns)
torso.CFrame = CFrame.new(randomspawns.Position + Vector3.new(0,2,0))
local sword = game.ReplicatedStorage.ClassicSword
local newsword = sword:Clone()
newsword.Parent = player.Backpack
end
end
for i = 10,0,-1 do
status.Value = i..' Seconds Remaining'
wait(1)
if i == 0 then
status.Value = 'Game Over!'
for _, players in pairs(game.Players:GetPlayers()) do
if player:FindFirstChild('leaderstats') then
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + 2
end
end
--break
--else
end
wait(1)
end
mapstorage:ClearAllChildren()
end?
COMMUNITY QUESTION
I was following a tutorial about making a roblox sword fighting game but the script was broken.Help?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
How do you realistically expect us to help you? You don't show us your script, and you don't link to the tutorial you used. We can't help you. We literally can't with the information provided. I get the impression you expect us to make the script for you.
ok ill add it
Could you add your code into a codeblock? https://forum.scriptinghelpers.org/topic/82/how-to-format-questions-answers-on-the-main-site
Error? There's a question mark at the end of your code; I'm not sure if that's actually in your code or you typed that by accident.