I wrote this script, as an attempt to make one of my AI's chat, when clicked. I used a remote function to make it client sided, instead of serversided, and I keep getting an error from the click script saying 'Argument 1 missing or nil' Here's the script:
script.Parent.MouseClick:Connect(function(player) if player:WaitForChild("PlayerGui").StoreGUI.Enabled == true then player.PlayerGui.StoreGUI.Enabled = false else script.Speak:FireClient() wait(8) player.PlayerGui.StoreGUI.Enabled = true end end)
You are doing script.Speak:FireClient() without specifying which client.
Do script.Speak:FireClient(player)