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 enable a local script inside replicatedfirst with a part button?

the title is pretty much self explanatory, i've been trying to enable/disable a script called localrain inside of replicatedfirst with a part button, this is the line of code i've been using (i also tried a remote event but im not good at using them

game.ReplicatedFirst.LocalRain.Disabled = false

if anyone could help me, i would be more than grateful!

1 comment

0

i think you have to use a remote event.

1 answer

Scripts inside storage services won't work even if enabled, a storage service serves.. to store things. You wouldn't want something stored to be running.

A solution is to just re-parent the local script outside ReplicatedStorage or use a module as modules are the only types of scripts that can be activated from a storage service. If you need to know what modules are, plenty of tutorials out there.

But, if you don't want to use modules, you just simply re-parent, here's an example I made below:

local rain = game.ReplicatedFirst.LocalRain
rain.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui") -- Just an example where to put it, you can put it anywhere you want.
rain.Disabled = false

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