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

How can I enable a local script using a server script?

I am making a on touch triggered area which changes the lightning ambient and background ambiance. So the touch script is a server script which is supposed to enable that local script which changes lightning ambient and background ambiance.

script.Parent.localscript.Disabled=false

I have tried doing it like this. But it seems to not work as i expected and not function at all.

1 answer

✓ Accepted answer
script.Parent.localscript.Disabled = false

I think it may be something to do with "localscript" Is the localscript called "LocalScript" or "localscript"?

Have you tried:

script.Parent.LocalScript.Disabled = false

4 comments

0

Its called localscript

0

Thing i am trying to do is to enable a local script with a server script, how can i do it?

0

What is the parent object of the localscript?

0

I've just tried to use a server script to enable a localscript and it works. Have you tried something like "if localscript.Disabled == true then print("not working") else print("works") end" ?

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