non-CanCollide Conveyor belts

Hello!

I’ve been trying to make a water current for a while now but I have failed every time.
Now I’m not a good coder by any means, I’d say that I can’t even code at all. I do know how to fix this though, I just don’t know how to implement it correctly.

This is the code I’m using.

while true do
script.Parent.Velocity = script.Parent.CFrame.rightVector *40
wait(0.1)
end

The only thing that it needs is to apply force to a certain body part, Like the LowerTorso or UpperTorso, But I have NO Idea on how to implement this.

Help would be appreciated!

1 Like

You should detect when a player touches your water part using .Touched and apply the force until they leave which you detect using .TouchEnded.

there is another way without coding just make a part nd from properties change
" assembly " and you now made Conveyor belts
(you can put it at the bottom of water)

That would work for most cases, but as they specified it has to be canCollide = false.

But a possible solution would be putting a conveyor part like that under the water part. This would work if the water isn’t very deep. @Covolts try this :slight_smile:

1 Like

I’ve tried this, It’s my current solution for now but it looks extremely unnatural.

Is it on a part? Lets assume not, lets assume its in the player. You need to make it check the name that its going to apply it to.
Or if its the part you just do the same but use :Touched()

I got an idea. Use Collision Groups. Collision Groups is found with the Model tab open and inside Advanced.


It will open this up and you will have to change from List View to Table View.

If you are in Table View, you will see a box where you can put a check mark.

A checkmark means that they can collide with each other. Default and Default can collide with each other. Default is like the ground/terrain.
Click on +Add Group and type in a name you want for your water part.

Press Enter and you will see it’s added to the table.

Now, add another one for players. Here’s what it should look like:

Click the box where it intersects players and WaterPart so they won’t collide with each other. We will make this happen in a script.

You can now close the Collision Groups Editor.
Make sure in the Properties of your water part, you change its CollisionGroup name from Default to WaterPart or the name you called it.

Add a Script inside StarterCharacterScripts.
image
Inside the script:

local char = script.Parent
for _,part in char:GetDescendants() do
	if part:IsA("BasePart") and part.Name ~= "LowerTorso" then
		part.CollisionGroup = "players" -- the name of collision group you call it
	end
end

Since the there’s no custom animation or player cannot jump while on the fake water part, it pushes the player off even if there’s no conveyor set because the rootpart is not touching it and it thinks the player is falling. You have to make the water part a two part if the water is deep so that there is an invisible collidable block so the player can tiptoe on it, or scale the water part shorter like in the video, or use a script to listen to Touched event and change the Humanoid’s HipHeight. Here I changed it to 8.2 and I was able to capture the still image of the character model floating moving slowly. The number varies depending on how tall the part is. Mine was 8 studs tall.

1 Like
while true do
script.Parent.Velocity = script.Parent.CFrame.rightVector *40
wait(0.1)
end

Not exactly an answer to your question (I think it’s already been provided fairly well), but you never need to make this a loop if you have the script.Parent part anchored. Just make this

script.Parent.Velocity = script.Parent.CFrame.rightVector * 40

Task.wait() is also a lot better than wait(), don’t use wait().