Trying to do a gui button but it says that MouseButton1Down is nil when i test it
Player = game.Players.LocalPlayer Menu = script.Parent Play = Menu.Parent Customize = Menu.Customize Loadout = Menu.Loadout Stats = Menu.Stats Info = Menu.Info Backing = Menu.Backing CGUI = Menu.CGUI function C1() CGUI.Visable = true end function C2() CGUI.Visable = false end if MouseButton1Down:connect(Customize) then C1() else C2() end
When you are using a connect statement, you do not put it in an If
Instead of this:
if MouseButton1Down:connect(Customize) then C1()
You would need to type this:
Customize.MouseButton1Down:connect(C1)