Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My script disable SpotLight script isn't working ?

Asked by 9 years ago

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 ??

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 tevinbyfield 5 — 9y
0
Please use a code block, it should be the Lua icon above the textbox you're putting your question in. M39a9am3R 3210 — 9y

1 answer

Log in to vote
3
Answered by
shayner32 478 Trusted Moderation Voter
9 years ago

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
0
TY SO MUCH !!!!!! tevinbyfield 5 — 9y
0
No problem! [remember, you can mark my solution as the correct answer and + vote it!] shayner32 478 — 9y
0
@shayner32 Idk how u can tell me and I will I just got this today tevinbyfield 5 — 9y
0
You need to click the accept answer button. It should be near the Report To Staff button. M39a9am3R 3210 — 9y
Ad

Answer this question