#Maybe A Table Issue that i cant solve

1 messages · Page 1 of 1 (latest)

amber sundial
#

it says "infinite yield possible on "spawn1"" idk why

#
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)
alpine plank
amber sundial
#

it exits

shrewd meteor
amber sundial
#

everything is correct

#

i checked 5 times

stuck laurel
#

does it work then

amber sundial
#

i will try it

stuck laurel
#

kk

amber sundial
#

but tomorrow

#

i couldnt get on for some reasons

amber sundial
#

not working

#

i tried

#

nvm