This is the script that does the FireClient()
local localInvis = game:GetService("ReplicatedStorage") local localHide = localInvis:WaitForChild("localHide") local players = game:GetService("Players") local player = players[script.Parent.Parent.Parent.Parent.Name] script.Parent.MouseButton1Click:Connect(function() print("after") localHide:FireClient(player) print("fired to player "..player.Name) end)
and this is the part of the localscript that does the function... (ignoring the code inbetween)
local Event = game.ReplicatedStorage.localHide local SetInvisible = false local GetInvisibleTable = {} Event.OnClientEvent:Connect(function() -irrelevant code end
Both of the print()-s in the script work, but the fireclient does not work i guess?
The reason is because MouseButton1Click doesn't work on a Server Script, Try this on a local script
Local Script:
local PlayersService = game:GetService("Players") local player = PlayersService.LocalPlayer script.Parent.MouseButton1Click:Connect(function() -- Code end)