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

Is it possible to make tools not go through other bricks? [UNSOLVED]

Asked by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

Even when set to true, the CanCollide property of a tool's Handle always behaves as if it is set to false. I was wondering if there was a way to make a handle stop when it hits another object. This would allow me to program swords with different block and parry moves that would actually prevent the opponent's sword from reaching you. Any answers are appreciated, and if there's a way to replicate this without actually making the CanCollide behave as if it was set to true, that would be fine as well.

2 answers

Log in to vote
-1
Answered by
Spooce 78
10 years ago

It's because the Mesh doesn't have a CanCollide Property and cannot be re-sized with tools, only through properties. Just re-size the Handle to cover the whole Mesh or lower the Scale of the Mesh.

0
The mesh is not the problem, even when there is NO mesh in the brick it does the same thing. Perci1 4988 — 10y
0
Sorry I couldn't help, you didn't really explain the problem well. Thanks for the down-vote... Spooce 78 — 10y
Ad
Log in to vote
-1
Answered by
IcyEvil 260 Moderation Voter
10 years ago

Maybe this will work.

script.Parent.CanCollide = true
 if script.Parent.CanCollide == false then
    script.Parent.CanCollide = true
    wait(99e99) -- Forgot the number for Infinite in Lua Change this to Infinite Number if this is not it.
end

The scripts parents CanCollide is true but if false then it is true and waits infinitely so It cant change back to false, Not entirely sure this will work, Hopefully it does.

0
As I said before, even when the CanCollide is set to true, the handle still goes through parts. Perci1 4988 — 10y

Answer this question