local PlayerModule = require(game.Players.LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")) local Controls = PlayerModule:GetControls() local gameStarted = game.ReplicatedStorage.gameStarted if gameStarted.Value == 1 then script.Parent.MouseButton1Click:Connect(function Controls:Enable() workspace.CurrentCamera.FieldOfView = 50 game.Players.LocalPlayer.CameraMode = 'LockFirstPerson' end) end
✓ ANSWER ACCEPTED
Im trying to make a button that only runs when gameStarted is 1, but i'm getting this error?
1 answer
✓ Accepted answer
You are doing script.Parent.MouseButton1Click:Connect(function wrong, here is how you do it:
script.Parent.MouseButton1Click:Connect(function() -- Add () (A space for parameter :p)
hope that helped
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
The error im getting is Players.[me].PlayerGui.ScreenGui.deployButton.LocalScript:6: Expected '(' when parsing function, got 'Controls'