place = { "Duel", "Training", "Bridge", "Normal", "Forest", "Mountains", "Frost", "Ruins", "Water" } -- Names of maps which need to be placed in lighting. I have "Regular" as an empty map so it just removes other scenarios
--Also, you have to have an empty model named LightingPlacement in the workspace
--HeyWhatsHisFace/DustyTT :P
game.Players.ChildAdded:connect(function(nP)
if nP:IsInGroup(2537795) then --Number is group id
if nP:GetRankInGroup(2537795) >= 12 then -- Number is group id then rank level
nP.Chatted:connect(function(msg)
for i = 1, #place do
if string.lower(msg) == "scenario/" ..string.lower(place[i]) then -- change "scenario/" to "run/" if you want
x = game.Lighting:FindFirstChild(place[i]):Clone()
M = Instance.new("Hint")
M.Parent = game.Workspace
M.Text = "Playing: " ..place[i].. " Scenario..."
p = game.Workspace.LightingPlacement:GetChildren()
for i = 1, #p do
p[i]:Destroy()
end
wait(1)
M.Text = place[i] .. " Scenario Loaded."
x.Parent = game.Workspace.LightingPlacement
wait(3)
M:Destroy()
elseif string.lower(msg) == "scenarios" then
gf = Instance.new("Hint")
gf.Parent = game.Workspace
gf.Text = "Current Scenarios: " ..place[1]..", " ..place[2].. ", " ..place[3].. ", " ..place[4]
wait(5)
gf:Destroy()
end
end
end)
end
end
^ Thats the code, group IDs are intact, and after the hint appears, it doesnt load the scenario or remove the hint, and it says the variable should be replaced with local.
And ya, this isn't my script, got it from a friend...
Also, the places are all there, and this supposedly happened after I added two more to the place list, though it couldve happened before.
Output error 1 : LightingPlacement is not a valid member of Workspace

7 comments
Also, the variables it said had to be changed to locals were X and M
Use code block instead of Inline Code. Code block is the blue circles that has a word (Lua) inside of it. Paste the script in-between the Squiggly lines. "~~~~~~~~~"
Check the answer below, sorry about that, screwed up lol
Copy and paste the exact error
There is no error, however I found some info from the output I'll post in the question.
Also, if you'd like, I can send you the model w/ everything required.
You should have your friend use PlayerAdded instead of ChildAdded.