Some glitch teleporting a part

If i try to teleport a cloned part into player, it does work before player dies but after they die, it only teleport to location where player died

local event= game.ReplicatedStorage.bushability
event.OnServerEvent:Connect(function(player, on, text, clcool, repst, char)
	local bush = repst.grass:Clone()
	local heal = bush:WaitForChild("heal")
	if on == true then
		local root = char:WaitForChild("HumanoidRootPart")
		repst.grass:Clone()
		bush.Name = "fakegrass"
		heal.Parent = bush
		local pos = Vector3.new(root.Position.X, 7.5, root.Position.Z)
		bush:ApplyImpulse(pos)
		bush.Parent = game.Workspace
		on = false
		text.Text = "in cooldown"
		wait(5)
		text.Text = "Spawn Bush ability"
		bush.Parent = repst
		on = true
		end
end)
1 Like

The reason the part teleports to the location that the player died, is because that every time you respawn, you are creating a new character. And since you are using the player’s character, you will need to update the player’s character to their new character when they respawn.

2 Likes

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