#Maybe A Table Issue that i cant solve
1 messages · Page 1 of 1 (latest)
local TeleporterGuy = game.Workspace:WaitForChild("Idles")
local Folder = game.Workspace:WaitForChild("BattleAreaSpawns")
local Spawns = {
[1] = Folder:WaitForChild("Spawn1"),
[2] = Folder:WaitForChild("Spawn2"),
[3] = Folder:WaitForChild("Spawn3"),
[4] = Folder:WaitForChild("Spawn4")
}
local SpawnList = #Spawns
local GuyHumanoid = TeleporterGuy:WaitForChild("Humanoid")
local OriginAnimation = GuyHumanoid:LoadAnimation(script.IdleAnimation)
OriginAnimation:Play()
local Animation = GuyHumanoid:LoadAnimation(script.TeleporterAnimation)
local Part = game.Workspace:WaitForChild("TeleportToBattleZonePart")
local Prompt = Part:WaitForChild("TeleportProximityPrompt")
local Cooldown = false
Prompt.Triggered:Connect(function(Player)
if not Cooldown then
Cooldown = true
local RandomSpawn = Spawns[math.random(1, SpawnList)]
local Character = Player.Character or Player.CharacterAdded:Wait()
local HRP = Character:WaitForChild("HumanoidRootPart")
if OriginAnimation.IsPlaying then
OriginAnimation:Stop()
end
Animation:Play()
task.spawn(function()
task.wait(0.3)
HRP.Position = Random.Position
end)
Animation.Stopped:Connect(function()
OriginAnimation:Play()
end)
task.spawn(function()
task.wait(3)
Cooldown = false
end)
end
end)
Could be because it doesn’t exist
it exits
checking if your name in explorer is not the same or you place that wrong position
what happens if you add a wait after teleporterguy
does it work then
i will try it
kk