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

How can I make a local touch function?

So I'm trying to make a destructible object that only breaks locally, but my issue is I can't seem to figure out how to make a local script recognize an object that your character touches. I'm a total Lua noob, so any help would be much appreciated!! :)

1 answer

At StarterPlayerScripts, add a local script that simply will (insert part here):Destroy() whenever the part gets Touched. To detect if something is touched, you can use the (insert part here).Touched event. Sadly, this ain't a request site. So you should figure out the script yourself. You can search for some info at the API reference or Lua 5.1 Reference Manual

3 comments

0

You realize he want's to recognize collision...?

0

oh, lemme redo that lol

0

I appreciate the help! I'll see what I can do with your information.

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