local Wheel1 = script.Parent.Wheels.FL
local wheel2 = script.Parent.Wheels.FR
local Wheel3 = script.Parent.Wheels.RL
local Wheel4 = script.Parent.Wheels.RR
local rep = game.ReplicatedStorage
local Vel = Wheel1.Velocity
local Vel2 = wheel2.Velocity
local Vel3 = Wheel3.Velocity
local Vel4 = Wheel4.Velocity
rep.V.OnServerEvent:Connect(function(player)
local SpeedPerStud = 1
local character1 = player.Character
local LastPosition = character1.HumanoidRootPart.Position
local DistanceFromLastPosition = (character1.HumanoidRootPart.Position-LastPosition).magnitude
Vel = Vel+(DistanceFromLastPosition+SpeedPerStud)
local LastPosition = character1.HumanoidRootPart.Position
print("works") -- this prints
end)
✓ ANSWER ACCEPTED
The velocity of the wheels isnt changing?
1 answer
✓ Accepted answer
ok 3 problems...
- Velocities have 3 vectors, and it goes in that direction relative to the world i think. so trying to do
Vel = Vel+(DistanceFromLastPosition+SpeedPerStud)
wont work, distance fromlast position is one number, and vector 3s have 3 values
- To change a velocity, you need its velocity property, so to change it, you gotta do
VelocityName.Velocity = a Vector3
- when you declare last position at the beginning, it doesnt do anything, its the same as calling the normal position because it happens at the same time almost cause scripts are fast, so distancefromalast position is actually 0, or close to it. I dont understand exactly what your trying to do so i cant make a script but i jsut want you to know these things so you can fix your code if you need.
i hope this helps :>
2 comments
1
THANK YOU cutie ;)
0
thx ',:3
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
any errors?
what type of velocity is it?
No there is no errors and i am not sure i just typed in velocity