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

My script disable SpotLight script isn't working ?

I've inserted a part added a Spotlight and here is my script : 1.function Light 2. game.workspace.part.script.SpotLight 3.end 4. 5.Light = Disabled

After It says there is an error with the word game help ??

2 comments

0

Sorry the function leads to the Spotlight like game.explorer.Part.SpotLight as a function named light then I do light = disabled then It will say that there it a problem with the word game in my function

0

Please use a code block, it should be the Lua icon above the textbox you're putting your question in.

1 answer

✓ Accepted answer

Try this: [please put the script in the same part as spotlight and name the spotlight "spotlight"]

local light = script.Parent.SpotLight

light.Enabled = false

4 comments

0

TY SO MUCH !!!!!!

0

No problem! [remember, you can mark my solution as the correct answer and + vote it!]

0

@shayner32 Idk how u can tell me and I will I just got this today

0

You need to click the accept answer button. It should be near the Report To Staff button.

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