Hello, so I was making a blocker system for my open gui, when someone is sitting in a car and clicks on it, it is supposed to play an error sound. But for some reason it is not working. I get Expected identifier when parsing expression, got ‘)’. But you need a ) for the end for it to work properly??
local remEvent = game.ReplicatedStorage:WaitForChild("OpenGUI") script.Parent.ClickDetector.MouseClick:Connect(function(player) local character = player.Character or player.CharacterAdded:wait() if character.Humanoid.Sit == false then remEvent:FireClient(player) else script.Parent.ERROR:Play() end)
try this
local remEvent = game.ReplicatedStorage:WaitForChild("OpenGUI") script.Parent.ClickDetector.MouseClick:Connect(function(player) local character = player.Character or player.CharacterAdded:wait() if character.Humanoid.Sit == false then remEvent:FireClient(player) else script.Parent.ERROR:Play() end end)