Error : FireClient: player argument must be a Player object
Script :
script.Parent.Touched:Connect(function() script.Parent.RemoteEvent:FireClient() end)
Local script :
local Player = game.Players.LocalPlayer script.Parent.RemoteEvent.OnClientEvent:Connect(function() local Menu = Player.PlayerGui:WaitForChild("Menu") Menu.Frame.Visilbe = true Menu.Close.Visible = true end)
You need to put a player in between the brackets of FireClient(). To get the player, you would have to get the character that touched the part, then take the name of that character and navigate through game.Players. Here's an example.
-- Server Script script.Parent.Touched:Connect(function(hit) -- hit is the part that touched script.Parent if hit.Parent:FindFirstChild("Humanoid") then -- Checking for a humanoid local plr = game.Players:FindFirstChild(hit.Parent.Name) if plr then -- Checking if the player exists script.Parent.RemoteEvent:FireClient(plr) end end end)
Hope it helps!