Help working out speed of beam

I need to work out the time it takes for a pattern on a beam to reach the end of the beam. This would involve the equation: time = distance/speed, but I have no idea how to work out the speed that the beam travels at (in studs per second).

Does anyone have any data or equations to help with this? Thank you

1 Like

You can refer to the texture speed here since its a property of said beam

https://create.roblox.com/docs/reference/engine/classes/Beam#TextureSpeed

and just for future example speed = distance/time

I need to find the time it takes in studs per second it takes the texture to get from the start point to the end point, this doesn’t help with that as far as I’m aware

Oh alright, well to find the distance you just need to calculate the distance between the two attachments, which we can do by simple vector maths

local distance = (beam.Attachment0.WorldPosition - beam.Attachment1.WorldPosition).Magnitude

and then then since we already have the speed we can calculate the speed per studs

local speedPerStud = beam.TextureSpeed/distance
2 Likes