Camera gui button not working

Hey developers,
I am working on a shop that is activated by a player clicking a button gui but, it won’t work.

The script is parented to a button gui.

local replicatedStorage = game:GetService("ReplicatedStorage")
script.Parent.MouseButton1Click:Connect(function(click)
	if click then
		local player = game.Players.LocalPlayer
		
		replicatedStorage:WaitForChild("TriggerCamA"):FireClient(player)
		end
     end

Please help!

Confusion? You’re calling FireClient() here, but you’re also referencing the LocalPlayer? Couldn’t you just use a BindableEvent instead? RemoteEvents should only be used if you’re handling client-server communication and such

2 Likes

You cannot use :FireClient() from the client, only the server.

1 Like

FireClient can only used from the server, FireServer can only be used from the client. I’ve gotten the mixed up few days ago so I still remember it. And also whatever you send in FireServer, the first argument will always be the player of the client that did it.

2 Likes