Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can you change the velocity of a conveyor belt part using scripts?

train = script.Parent.Train track = script.Parent.Track

script.Parent.Touched:connect(hit) if hit.Name== "Sensor" then

end

end)

This is a partial script for when the train part comes in contact with the sensor part, after that I need to slowly diminish the velocity of the conveyor belt part until the train stops at the station. Would I write it just like a transparency property? please help

1 answer

✓ Accepted answer

just make a For loop to slowly deminish the property value to zero.

something like this:

train = script.Parent.Train
track = script.Parent.Track
track.Velocity = Vector3.new(whatever you want it to slide like. See figure 1)
for speed = 20,0,-1 do
track.Velocity = Vector3.new(the previous number, but change one to speed. See figure 2)
end

Figure 1: (0,0,20) Figure 2: (0,0,speed)

3 comments

0

Thanks!!

0

oh, it actually worked? Like, first time?

0

great

This discussion is preserved as it was. New answers, comments, and votes are closed.