hello
I've been struggling since earlier for something that looks easy. I'm not very comfortable with remotes, so I don't really know how it works.
I have a script error: 13:56:37.349 - FireClient: player argument must be a Player object
and I'm not sure how to fix it.
here are the two scripts
server script :
value = script.Parent.Value.Value
torsop = script.Parent.Parent.Parts.Torsoe
head = script.Parent.Parent.Parts.Heade
fly = script.Parent.Parent.Parts.SonicFly
lefta = script.Parent.Parent["Left Arm"]
righta = script.Parent.Parent["Right Arm"]
leftl = script.Parent.Parent["Left Leg"]
rightl = script.Parent.Parent["Right Leg"]
eye1 = script.Parent.Parent.Parts.Eyes1
eye2 = script.Parent.Parent.Parts.Eyes2
-----------------------------------------------------------------------------
local repstorage = game:GetService("ReplicatedStorage")
local Remote = repstorage:WaitForChild("Remote")
-----------------------------------------------------------------------------
----------------------------------- BASIC ATTACK -------------------------------
-------------------------- Sonic kills and chase -------------------------------
if value == 0 then -- event choice
local active = false -- currently in chase?
local found = false -- anyone within range?
while wait(2) do
found = false -- reset before checking again
for i,v in pairs(game.Players:GetChildren()) do
local range = (v.Character.HumanoidRootPart.Position - Torso.Position).magnitude -- I changed it to HRP instead of Torso, this exists in all humanoids, Torso is R6 only.
if range <= 80 then
found = true
if not active then
active = true
-- start chase
torsop.Transparency = 1
head.Transparency = 1
righta.Transparency = 1
lefta.Transparency = 1
leftl.Transparency = 1
rightl.Transparency = 1
fly.Transparency = 0
eye1.Transparency = 1
eye2.Transparency = 0
-- char change
sonic.WalkSpeed = 29
Remote:FireClient() --------- The problem is here -----------
break -- breaks the for loop
end
end
end
if not found then -- the entire for loop ran without finding anyone
active = false
-- stop chase
torsop.Transparency = 0
head.Transparency = 0
righta.Transparency = 0
lefta.Transparency = 0
leftl.Transparency = 0
rightl.Transparency = 0
fly.Transparency = 1
eye1.Transparency = 0
eye2.Transparency = 1
-- char change
sonic.WalkSpeed = 18
end
end
-------------------------------------------------------
end --- end of the script
local script
local repstorage = game:GetService("ReplicatedStorage")
local remote = repstorage:WaitForChild("Remote")
remote.OnClientEvent:connect(function(player)
print(player.Name.."has fired this event")
end)
any suggestions ?

5 comments
First of all, Where is the Server script's parent with?
game.workspace.SONIC.ChasingStatus
On 46 line in FireClient add v, and in localScript you need to remove player in function. So if you want to get player name, you can fire it from server(FireClient(v, v.Name) or game.Players.LocalPlayer.Name
like this ? : (in server script a line 46) Remote:FireClient(v, v.Name)
Yea