local char = player.Character
local textlabel = script.Parent
local timer = 3
local red = workspace.red1
local blue = workspace.red2
local green = workspace.red3
local yellow = workspace.red4
local deletedparts = 0
textlabel.Text = "gaem starts in: " .. timer
task.spawn(function()
while timer > 0 do
task.wait(1)
timer -= 1
textlabel.Text = "gaem starts in: " .. timer
if timer == 0 then
textlabel.Text = "gaem is starting!!!11111!!!!"
task.wait(2)
game.ReplicatedStorage.GameStarting:FireServer(timer)
task.wait(1)
while true do
local random = math.random(1, 4)
if random == 1 then
red.Parent = game.ReplicatedStorage
deletedparts = deletedparts+1
elseif random == 2 then
blue.Parent = game.ReplicatedStorage
deletedparts = deletedparts+1
elseif random == 3 then
green.Parent = game.ReplicatedStorage
deletedparts = deletedparts+1
elseif random == 4 then
yellow.Parent = game.ReplicatedStorage
deletedparts = deletedparts+1
task.wait(2)
end
if deletedparts == 4 then
deletedparts = 3
if random == 1 then
red.Parent = workspace
elseif random == 2 then
blue.Parent = workspace
elseif random == 3 then
green.Parent = workspace
elseif random == 4 then
yellow.Parent = workspace
end
end
end
end
end)```
the closing bracket at the end, its fucking saying 'expected idenitfier, got ')''
#random error??
1 messages · Page 1 of 1 (latest)
You are missing a 'end'
you have an extra end
where
missing an end
missing
you need an end at the deleted parts section
the if inside the deleted parts
doesnt have an end to it
wtf i thought it was extra end 😭
indentation helps lua if deletedparts == 4 then deletedparts = 3 if random == 1 then red.Parent = workspace elseif random == 2 then blue.Parent = workspace elseif random == 3 then green.Parent = workspace elseif random == 4 then yellow.Parent = workspace end
nope 😐
i love this
I want to make a game /:
yeah im tripping i couldnt read well without the syntax highlighting😭