I am making a Find the Pots game, and one of them requires a button. I put this LocalScript in StarterPlayerScripts, what’s wrong?
Edit: It’s in a LocalScript because I only want the player who touched the button to get it.
local button = game.Workspace.Button
button.ClickDetector.MouseClick:Connect(function(Player)
if button["Activated?"] == false then
button["Activated?"] = true
button.Material = Enum.Material.Neon
button["vine boom"]:Play()
game.Workspace.Pots["Red Pot"].CanTouch = true
game.Workspace.Pots["Red Pot"].Decal.Transparency = 0
game.Workspace.Pots["Red Pot"].Face2.Transparency = 0
end
end)
``