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

Why does not any scripts in my cloned local parts work?

So,

I've been trying and trying for hours coming up with impossible solutions, all I want is a clickable key, that when clicked, will be destroyed; which would then make it possible to go through another door. This is quite easy to do, and I did it, in normal parts. But, when cloning them and making them into local parts, (parts that each and every player should see and have separately) it just does not want to work. Can scripts in local parts even work? I tried making simple scripts, such as when clicking print. Or when touched print something. That doesn't work either, what am I doing wrong? Am I missing something? I'm just very confused and frustrated. Please, help is very much appreciatable.

Regards, Simon.

1 answer

✓ Accepted answer

There is no need to clone the parts. Just have them in the workspace and use a Local Script to deleted them locally (assuming FE is enabled).

A common mistake you are probably making is having these cloned parts use a Server Script. This will not work because Filtering Enabled is doing its job in securing the game. Server Scripts only run if the Server can see it and if it is in a spot where it can run. In this case, the server cannot see the script because it was cloned locally.

Instead of having the Server Script detect the clicking, attach the Local Scripts to the ClickDetectors and their events instead. You could also make a custom system with Mouse.Target and UserInputService if you don't want to stick with ClickDetectors.

Good luck!

1 comment

0

Thank you, thank you, thank you. I'll try this!

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