You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
Get Speed Touch From Two Parts
What is the issue? Include screenshots / videos if possible!
i no have idea how to make it
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
yes
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
-- This is an example Lua code block
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
local Part2Velocity = Part2.Velocity.Magnitude -- The velocity of the 2nd part
local Part1Velocity = Part1.Velocity.Magnitude -- The velocity of the 1st part
local VelocityDifference = math.abs(Part2Velocity - Part1Velocity) -- The absolute (positive) value of the 2 part's different speeds
-- Remove math.abs if you want negative values
You could also subtract the Velocities directly instead of the magnitudes to get the X,Y, and Z difference of the two
local Part2Velocity = Part2.Velocity -- The velocity of the 2nd part
local Part1Velocity = Part1.Velocity -- The velocity of the 1st part
local VelocityDifference = Part2Velocity - Part1Velocity -- The vector3 of the 2 part's different speeds
What do you want the system for? What does the touch do, and why do you need speed for the thing it does? If you want, could you upload me the .rbxl place file or the model’s .rbxm file?
I’m guessing that if the part just dissappears, and it isn’t being destroyed with :Destroy(), the velocity that the part is being set to is too high, making it launch itself off the map.
I’m assuming you want the instantaneous velocity at the moment two parts touch, but this is sadly not consistently possible. .Touched fires AFTER physics calculations have been performed, meaning the calculations to velocity upon collision are performed before .Touched is fired.