Scripts in Client Parts

What type of script runs in a part that’s spawned by the client? I can’t seem to run any script in it.

A LocalScript. This is because the part does not exist on the server and only exists on the client unless you were to fire a RemoteEvent that cloned the part and put it on the server as well.

Unfortunately neither a Script or a LocalScript run in it. I’ve tried.

A LocalScript will run in it. Show me the code that you have in your LocalScript or LocalScripts.

Screen Shot 2024-05-05 at 1.23.47 AM
I assume this doesn’t run because it’s not a descendant of the player. But what script would?

where do you store this local script?

a part that was spawned by the client, like i said. The part is in a folder in workspace.

bro… and where is the part stored?

read my message again…

character limit

Use a ServerScript, change the RunContext to Client, and see if that works.

2 Likes

how do i make you understand? the local script you are using, you are duplicating it from somewhere, right? or the part whatever? when you spawn them?

Woah. It works! I’m not sure why I thought to test this, as I just assumed this turned it into a LocalScript based on the visuals. But it worked, so, thank you.

1 Like

well it still technically works like one

It’s mostly likely a class thing, as the only thing that doesn’t change is the .ClassName, and really, the class itself. Roblox probably runs scripts that it thinks are ServerScripts. But the script itself knows it’s a client sided one, so the clients run it. It’s just my proposal, my guess.

1 Like

Strangely, plain old LocalScripts don’t run just anywhere. However, ServerScripts with the RunContext changed to Client do. Glad I could help out though!

1 Like

thats where i was trying to get. thanks for the better explanation

1 Like