Turn CanCollide off in a script?
So I'm working on an RPG but have basically no knowledge of LUA at all....tho im picking up on things and slowly am learning
so ive got a basic mining mechanic and i wanted the rock to disappear when its killed....knowing nothing i figured the easiest way would be to make it transparent and turn collision off when its 0hp
so ive got this part in my script which turns the rock transparent but idk if im doing the CanCollide wrong because its not turning CanCollide off
01 | elseif script.Parent.Ore.Health< 1 then |
02 | script.Parent.Rock.Transparency = 1 |
04 | script.Parent.Head.Transparency = 1 |
06 | script.Parent.Head.CanCollide = false |
08 | script.Parent.Torso.CanCollide = false |
The transparency part works perfect, but when i kill the rock it turns inadvisable but i can still collide with it