I’ve been searching for tutorials on YouTube on how to do so, but with no hope. Can you guys please tell me how to make a moving part that moves the player when he stands on it?
Thanks for anyone that will help me!
I’ve been searching for tutorials on YouTube on how to do so, but with no hope. Can you guys please tell me how to make a moving part that moves the player when he stands on it?
Thanks for anyone that will help me!
This uses a CFrame approach that basically offsets the player’s CFrame by the same amount that the moving part moved
local MovingPart = game.Workspace:WaitForChild("MovingPart") -- Change this to the path to the part you want to move
local debounce = false
function onTouched()
if debounce == false then
debounce = true
for i = 1, 10 do
MovingPart.CFrame = MovingPart.CFrame * CFrame.new(0, 1, 0) -- Adjust to your liking
task.wait()
end
debounce = false
end
end
MovingPart.Touched:Connect(onTouched)
Hope this helps!
you can use align position and align orientation in the part to move it (can even do this client side) and it should also move the player if they are standing on the part when it moves
I’ll test it and see.
Edit: Nope, it doesn’t work. It implements the opposite. Whenever I touch it, its Y axis value increases by 1. It doesn’t work
You marked my post as the solution, so I guess it ended up working? I mean, if the Z axis is off, just play around with the numbers and it should change and do what you want.
No, that’s not what I want, mate. As you know, when you make a moving part and stand on it, it doesn’t move you to the direction that the part is going to. You have to make some codes to make the player move in the direction that the part is moving to when he stands on it.
You could use TweenService
. Have you learned about that yet?
Yea, I have a basic understanding of it, but will it make the player move when he stands on the moving part?
It should. You can try it and let me know if it doesn’t work or errors in any way.
Alright, I’m gonna use it and see if it works. I’ll edit this message to say if it works or not
Edit: No it doesn’t work lol. When I stand on the part, the player doesn’t move with it.