local green = game.Workspace.green:GetChildren() function onClicked(plr) -- On click get player if green.PLRNAME == plr.Name.Value then script.Parent.Parent:Destroy() end end script.Parent.ClickDetector.MouseClick:Connect(onClicked)
ok so what im guessing is either
local green = game.Workspace.green -- i altered this part a bit function onClicked(plr) -- On click get player if green.PLRNAME == plr.Name.Value then script.Parent.Parent:Destroy() end end script.Parent.ClickDetector.MouseClick:Connect(function(plr) -- i also altered this part onClicked(plr) end)
or that
local green = game.Workspace.green -- i altered this part a bit function onClicked(plr) -- On click get player if green.PLRNAME == plr.Name then -- i also altered this part a bit script.Parent.Parent:Destroy() end end script.Parent.ClickDetector.MouseClick:Connect(function(plr) -- i also also altered this part onClicked(plr) end)
i apologize if this dusnt work ur question is also too broad btw
This was succesfully fixed:
local green = game.Workspace.green function onClicked(plr) -- On click get player if green.GREEN.PLRNAME.Value == plr.Name and plr.leaderstats.Money.Value >=50 and plr.leaderstats.Machines.Value == 5 then script.Parent.Parent:Destroy() end end script.Parent.ClickDetector.MouseClick:Connect(function(plr) onClicked(plr) end)
Closed as Too Broad by User#24403, ee0w, TheluaBanana, and evaera
This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.
Why was this question closed?