Here is my script. It works (almost) perfectly in studio, but doesn't work AT ALL in game. Why?
EDIT: Now the script doesn't work in Studio either. Whoop-de-doo. It used to work perfectly. I changed NOTHING
repeat
wait()
game.Workspace.dungeon:Play()
local hint = Instance.new('Hint', Workspace)
hint.Text = "Beginning the game.."
wait(20)
hint:Destroy()
game.Workspace.dungeon:Stop()
modelOfBricks = game.Workspace.spawnwalls
nameOfBricks = "spawnwall"
for i,v in pairs(modelOfBricks:GetChildren()) do
if v.Name == nameOfBricks then
v.Transparency = 1
v.CanCollide=false
end
end
game.Workspace.boss3:Play()
local hint = Instance.new('Hint', Workspace)
hint.Text = "Go go go!"
wait(4)
hint:Destroy()
game.Lighting.Venomshank:Clone().Parent = game.Workspace
game.Lighting.Darkheart:Clone().Parent = game.Workspace
game.Lighting.Illumina:Clone().Parent = game.Workspace
wait(180)
for i, player in ipairs(game.Players:GetPlayers()) do
if player.Character then
local hum = player.Character:FindFirstChild('Humanoid')
if hum then
hum.Health = 0
end
end
end
game.Workspace.boss3:Stop()
local stat = "KOs"
local players = game.Players:GetPlayers()
for i,v in pairs(players) do
if v.leaderstats then
local lstat = v.leaderstats:FindFirstChild(stat)
if lstat then
lstat.Value = 0
end
end
end
local hint = Instance.new('Hint', Workspace).
hint.Text = "The round has ended"
wait(4)
hint:Destroy()
modelOfBricks = game.Workspace.spawnwalls
nameOfBricks = "spawnwall"
for i,v in pairs(modelOfBricks:GetChildren()) do
if v.Name == nameOfBricks then
v.Transparency = 0
v.CanCollide=true
end
end
until 1+1==3

1 comment
I did that, but didn't see any direct errors for that particular script. Hmm