So, I have encountered an error, which is seen in the title, “Attempt to index nil with ‘Velocity’”.
Velocity is referring to the Velocity instance inside of a BodyVelocity, which is inside a tool of mine
I know how this error occurs, but I don’t know how to patch/fix it.
Pretty much, when I try to destroy the BodyVelocity before it’s used, it gives me this error.
Once you destroy the body velocity, something is still trying to access it, after its been destroyed.
Without seeing any code, I can’t give you more than that, but that is what is happening
When something is deprecated, it still works, just it is recommended to not use it for new projects, as it has the potential of being removed in the future (not much of a concern with that for Roblox) but more importantly, newer and supposedly better things have replaced it.
But deprecated items still work.
Oh wait, before you do that, you need to insert a module script inside of the client script.
You don’t have to name the module script anything btw.
Here is the code for the module script:
local module = {}
function module.executeinvisible ()
script.Parent.Parent.Handle.Transparency = 1
end
function module.executevisible ()
script.Parent.Parent.Handle.Transparency = 0
end
return module
By cute, I mean because in testing I have a little cube, and its like im trying to throw it away, and it spins right back to me. Must love me
Ok so I am getting the error, and looking in the touched event, and I see you doing some coroutine stuff.
Explain what you are doing when the object hits something, such as the wall?