I put while in the sense that it will loop, The system works but it dosent loop, Can someone help?
while true do
task.wait()
game.Players.PlayerAdded:Connect(function(plr)
local Intermission = 1
local Round = 1
local part = script.Parent -- the part that you want to shrink
local tweenService = game:GetService("TweenService")
local info = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.In) -- duration: 0.5 seconds, linear easing, in-out direction
local size = Vector3.new(50,20,50)-- the final size of the part (10% of its original size)
local tween = tweenService:Create(part, info, {Size = size}) -- create the tween
if Intermission < 2 then
task.wait(10)
plr.Character:MoveTo(game.Workspace.Baseplate.Position)
tween:Play()
Round = 3
Intermission = 3
end
if Round > 2 then
task.wait(20)
part.Size = Vector3.new(500, 20, 500)
plr.Character:MoveTo(game.Workspace.Lobby.Platform.SpawnLocation.Position)
Intermission = 1
Round = 1
end
end)
end
game.Players.PlayerAdded:Connect(function(plr)
while task.wait() do
local Intermission = 1
local Round = 1
local part = script.Parent -- the part that you want to shrink
local tweenService = game:GetService("TweenService")
local info = TweenInfo.new(10, Enum.EasingStyle.Linear, Enum.EasingDirection.In) -- duration: 0.5 seconds, linear easing, in-out direction
local size = Vector3.new(50,20,50)-- the final size of the part (10% of its original size)
local tween = tweenService:Create(part, info, {Size = size}) -- create the tween
if Intermission < 2 then
task.wait(10)
plr.Character:MoveTo(game.Workspace.Baseplate.Position)
tween:Play()
Round = 3
Intermission = 3
end
if Round > 2 then
task.wait(20)
part.Size = Vector3.new(500, 20, 500)
plr.Character:MoveTo(game.Workspace.Lobby.Platform.SpawnLocation.Position)
Intermission = 1
Round = 1
end
end)