How To Fix HumanoidRootPart Teloporting to many times?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want my players HumanoidRootPart to not keep teleporting to the same CFrame multiple times and I want the player to only teleport once.

  1. What is the issue? Include screenshots / videos if possible!

–No Video/Screenshot

My issue is every time I run my round system it teleports the player to the same CFrame multiple times and it needs to only do it once.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I have tried finding my same issue or closely related one on the Developer Hub and had no luck I also tried a repeat loop but that didn’t work.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

My script is down below I am not that advanced at scripting yet so if its a little bug if you could possibly write how I could fix this and modify my code so I can see where I messed up at.

local RoundStatus = game:GetService("ReplicatedStorage"):WaitForChild("Round Status")
local Players = game:GetService("Players")
debounce = false
while true do
	for i = 20, 0, -1 do
		RoundStatus.Value = "Intermission:"
		script.Parent.Text = RoundStatus.Value .. i
		wait(2)
		if i == 0 then
			print("Intermission Ended")
			for _, player in ipairs(Players:GetPlayers()) do
				local character = player.Character
				local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
				if humanoidRootPart then
					for v = 10, 0, -1 do
						RoundStatus.Value = "Time Left:"
						script.Parent.Text = RoundStatus.Value .. v
							humanoidRootPart.CFrame = game.Workspace.Part.CFrame
						if v == 0 then
							RoundStatus.Value = "Game Ended!"
							script.Parent.Text = RoundStatus.Value
							humanoidRootPart.CFrame = game.Workspace.p2.CFrame
						    
						end
						wait(1)
					end
				end
			end
		end
	end
end

Here you are setting for 10 times the HumanoidRootPart’s CFrame, put the part where you move it just before the for loop and after the if statement

Also, instead of setting the string 2 different times, do:

RoundStatus.Value = “Time Left:” .. v

Instead of doing it 2 times

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.