Hey, so basically I’ve got this speed script.
However, the numbers are pretty low, for example you could be moving “fast” but it’ll show “11 MPH”.
I’m looking for a way to turn that “11” into a higher number, such as 4x higher.
Here’s the script so far:
local SpaceShip = workspace:WaitForChild("SpaceShip"):GetChildren()[1]
function partSpeed(part)
local pos = part.Position
wait(0.1)
return (part.Position - pos).magnitude
end
while true do wait()
local CutNumber = string.split(tostring(partSpeed(SpaceShip)), ".")
script.Parent.Text = tonumber(CutNumber[1])
end
so, i dont use them too much but i know theres a property and function of BaseParts that let you get a part’s velocity. BasePart.AssemblyLinearVelocity gives you the velocity of the part at that instance but can only be used by the server. BasePart:GetVelocityAtPosition() is one i have 0 experience using but it takes a Vector3 as an argument. Theres no description for it on the Roblox Dev website. I would try using those instead
local multiplier = 4
while wait() do
local CutNumber = string.split(tostring(partSpeed(SpaceShip)), ".")
script.Parent.Text = tonumber(CutNumber[1]) * multiplier
end
Hey, I’ve tried that but the massive issue with that is the fact that it basically jumps from 0 → 4 → 8 etc, and it looks very robotic because it doesn’t count up to the multiplication
those are the velocity vectors. That seems liks its working like it should. Im assumind youre using the AssemblyLinearVelocity property? By the looks of it you werent moving very fast. Are you updating the value each frame? or did you just set it once and reuse it in a loop without redefining the velocity?