So I've been scripting and I'm making a Roblox Ninja Warrior, I'm using the velocity cause it's a good friend of mine and I want to make it turn to 0 when a humanoid touches a part.
Script:
function OnTouched(hit)
script.Parent.Parent.Thingy.Velocity.X=0
end
script.Parent.Touched:connect(OnTouched)
I've been doing Vector3 (Error told me) but it still didn't work so I did this. Still doesn't work! Roblox shows me this when I touch the part:
X cannot be assigned to
Idk wth I gotta do. Anyone tell me what to do and/or fix my script?

1 comment
You cannot change an x,y or z alone, you have to change the whole number