Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

why cant i activate script with body velocity ?

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

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

1 comment

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

This discussion is preserved as it was. New answers, comments, and votes are closed.