ts happens when AUTO rejoining
from this script
local TeleportService = game:GetService(“TeleportService”)
local UserInputService = game:GetService(“UserInputService”)
local player = script.Parent.Parent
local character = player.Character or player.CharacterAdded:Wait()
local hrp = character:WaitForChild(“HumanoidRootPart”)
local idleTime = 0
local maxIdleTime = 1120
UserInputService.InputBegan:Connect(function()
idleTime = 0
end)
local lastPosition = hrp.Position
task.spawn(function()
while true do
task.wait(1)
idleTime = idleTime + 1
print(idleTime)
local currentPosition = hrp.Position
if (currentPosition - lastPosition).Magnitude > 5 then
idleTime = 0
lastPosition = currentPosition
end
if idleTime >= maxIdleTime then
TeleportService:Teleport(game.PlaceId, player)
break
end
end
end)
A private message is associated with this bug report