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

Any good alternatives to .Touched that don't require me to change all my code?

I've been working on a fighting game for a while now, and I just now realized that using .Touched on hitboxes that I spawn in is extremely inconsistent and makes the game very unfun when only 10% of your attacks land. Is there any alternative to .Touched that doesn't require me to completely overhaul every script in the game?

1 answer

Simple Answer: There is not. You will have to use raycasting. Also, if you are having multiple scripts in the game that do the same thing.. That is breaking DRY(dont repeat yourself) coding rule. Use a modulescript to store your raycasting functions and attack and everything.

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