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

A Tool Question?

If I want to make an onclick script do I HAVE to absolutely HAVE to use a local script? And do I have to use a handle? and how do I prevent the player's arm from going up when it is equipped while still playing the walking animation?

1 answer

If you're making an 'onClicked' function, a.k.a - a Button1Down or Button2Down event, then yes. You must use a localscript. The reason is because there is simply no way to get the client's mouse with a server-sided script. If you're having trouble with client-to-server communication then I suggest you look into RemoteEvents and RemoteFunctions- read more here.


So essentially you're wanting an invisible tool? You could either edit the welds for the character's arms, and make the tool's handle invisible.. OR just use a HopperBin. I highly suggest the latter. And you don't HAVE to have a handle inside of a tool but if you want to be able to equip the tool, you do. But again, what i think you're needing involves the usage of HopperBins.

2 comments

0

No I want a tool that plays an animation when you click and clones from server storage but it worked in a server script and it didnt work in a local script. Plus im bad with local scripts.

0

There's not really a way to be 'bad' at localscripts. Anyways, if FilteringEnabled isn't on then you shouldn't have a problem with any of this.

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