I'm just trying to make a button that does something when you click it. the problem is it keeps displaying a error saying "MouseButton1Click is not a valid member of Button" All of this code is inside of a local script which is located in the button.
local Player = game.Players.LocalPlayer local Button = script.Parent
Button.MouseButton1Click:Connect(function() print("works") end)
uuh, don't make button a variable, do that
script.Parent.MouseButton1Click:Connect(function() print("this button works!") end)
this script should be work