My goal is to send arguments player and item to the local script, but when I try to catch them, I get an error saying that the argument is not valid:
PlayerGui is not a valid member of Part “Workspace.BlockClone”
Server Script:
prompt.Triggered:Connect(function(player)
if prompt.ActionText == "Inspect" then
prompt.Enabled = false
inspect:FireClient(player, item) -- inspect is the RemoteEvent
Client Script:
local gui = script.Parent
inspect.OnClientEvent:Connect(function(player, item)
local clone = gui:Clone()
clone.Enabled = true
clone.Parent = player.PlayerGui
end)
I’m pretty sure that the Triggered event returns the player, so I’m confused
local gui = script.Parent
local function event(player, item)
local clone = gui:Clone()
clone.Enabled = true
clone.Parent = player.PlayerGui
end
inspect.OnClientEvent:Connect(event)