Created prints for walking, jumping and touched. None trigger…?
Ah yes, I found out why. For some reason, the part seems to delete itself as soon as I touch it.
Ok. Might have found out why LOL. testing now
Try this:
local Players = game:GetService("Players")
local GoTo = game.Workspace:FindFirstChild("destination")
local tp3 = script.Parent
local DisableControls = script.RemoteEvent
tp3.Touched:Connect(function(hit)
local w = hit.Parent:FindFirstChild("HumanoidRootPart")
for _,player in pairs(game.Players:GetPlayers()) do
local char = player.Character
local humanoid = char:FindFirstChild("Humanoid")
DisableControls:FireClient(player)
humanoid:MoveTo(GoTo.Position)
v.Humanoid.Jump = true
wait(.5)
v.Humanoid.Jump = true
wait(5)
end
end)
I forgot to add the player argument into the DisableControls event.
MoveTo teleports you, unfortunately. Is there a way to make them like. Walk?
Try humanoid:MoveToPart(GoTo).
Wait no my apologies, it’s Humanoid.WalkToPart, not MoveToPart.
Also are you sure MoveTo() is being called on a humanoid? Because :MoveTo() only teleports if it’s called on a model. It should walk if called on a humanoid.
Ooh yeah. I’m using a StarterCharacter if that is a problem…
It shouldn’t be, as long as :MoveTo() is called on a humanoid. Also I just realized that forgot to change the Humanoid.Jump variables:
local Players = game:GetService("Players")
local GoTo = game.Workspace:FindFirstChild("destination")
local tp3 = script.Parent
local DisableControls = script.RemoteEvent
tp3.Touched:Connect(function(hit)
local w = hit.Parent:FindFirstChild("HumanoidRootPart")
for _,player in pairs(game.Players:GetPlayers()) do
local char = player.Character
local humanoid = char:FindFirstChild("Humanoid")
DisableControls:FireClient(player)
humanoid:MoveTo(GoTo.Position)
humanoid.Jump = true
wait(.5)
humanoid.Jump = true
wait(5)
end
end)
I tried both char:moveto and humanoid:moveto but they dont work
Are they both not working, or are they both just teleporting the player like you mentioned earlier?
This v
You said you were using a StarterCharacter right? Check if all of the parts in that character are unanchored, if any are anchored, unanchor them.
It worked! Heck yeah! Tysm
Please don’t have someone rewrite your script in a topic that asks for a fix.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.