Hello,
So, I keep getting errors, not sure how to fix it. "FireClient: player argument must be a Player object"
local repStorage = game:GetService("ReplicatedStorage") local plankRemote = repStorage:WaitForChild("plankRemote") local planksTrigger = game.Workspace.FallingPlanks.PlankTrigger planksTrigger.Touched:Connect(function(hit) local player = hit.Parent:FindFirstChild("Humanoid") if player then print("touched") plankRemote:FireClient(player) end end)
Help is very much appreciated!
The problem is that you're referencing the character as the player value. the FireClient function requires that you have the player object as the input, not the character.
local repStorage = game:GetService("ReplicatedStorage") local plankRemote = repStorage:WaitForChild("plankRemote") local planksTrigger = game.Workspace.FallingPlanks.PlankTrigger planksTrigger.Touched:Connect(function(hit) local player = hit.Parent:FindFirstChild("Humanoid") if player then print("touched") plankRemote:FireClient(game.Players:GetPlayerFromCharacter(player)) end end)