Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why cant i activate script with body velocity ?

Asked by 10 years ago

s = script.Parent bvelocity = s.BodyVelocity a=script.Parent.Parent

if s.velocity > s.CFrame.lookVector * 10 then a.trail.enabled=true

end

i keep getting this error

17:18:22.159 - Workspace.bike.Model.Trail.Script:5: attempt to compare two userdata values

1 answer

Log in to vote
0
Answered by 10 years ago

I am not too sure what you're trying to do, because you cannot compare vectors in such fashion. Please describe your situation.

But I will take a guess, that you want to compare distances. Then you'd do it this way:

s = script.Parent 
bvelocity = s.BodyVelocity
a=script.Parent.Parent

if s.velocity.magnitude > 10 then 
a.trail.Enabled=true
end
0
this script is designed to activate the trail for http://www.roblox.com/seat-test-2-item?id=153198356 which im trying to turn into one of the old tron light cycles that turn at 90 degrees RACER1995 0 — 10y
Ad

Answer this question