for some reson this doesnt work
serverscript
local stadardTimerInScript = 30
local timerInScript = 30
local killBlocksTimer = 6
local KillBlocksTimerUse = 6
repeat
if KillBlocksTimerUse == 0 then
local moveBlocks = game:WaitForChild("ReplicatedStorage"):WaitForChild("MoveBlocks")
if moveBlocks.Value == true then
moveBlocks.Value = false
elseif moveBlocks.Value == false then
moveBlocks.Value = true
end
KillBlocksTimerUse = killBlocksTimer
end
timer.Value = timerInScript.." seconds left!"
timerInScript -= 1
wait(1)
KillBlocksTimerUse -= 1
until timerInScript <= 0
other server script:
local tweenService = game:GetService("TweenService")
local killBlocksAmount = #game.Workspace.MiniGameFolder.KillBlockFolder:GetChildren()
game:WaitForChild("ReplicatedStorage"):WaitForChild("MoveBlocks"):GetPropertyChangedSignal("Value"):Connect(function()
math.random(1,killBlocksAmount)
local killBlockToMove = game.Workspace.MiniGameFolder.KillBlockFolder:FindFirstChild("KillBlock"..tostring(killBlocksAmount))
local Info = TweenInfo.new(
5,
Enum.EasingStyle.Quart,
Enum.EasingDirection.In,
0,
true,
0
)
local oldXPos = killBlockToMove.CFrame.Position.X
local oldYPos = killBlockToMove.CFrame.Position.Y
local newZPos = killBlockToMove.CFrame.Position.Z -65
local Goals =
{
Position = Vector3.new(oldXPos, oldYPos, newZPos);
Color = Color3.new(1, 0, 0)
}
local KillPartTween = tweenService:Create(killBlockToMove, Info, Goals)
KillPartTween:Play()
wait(5)
end)