Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

my FireClient script doen't work with remoteEvent doen't work, why?

Asked by 6 years ago

I make an animation stuff and I need fire client, I made it, but when it runs it does error.

01-- in script
02 
03game.ReplicatedStorage:FindFirstChild("Events"):FindFirstChild("PunchAnimation"):FireClient(r6Ids, r15Ids, character, punched, punchWaitTime)
04 
05-- in local script
06 
07game.ReplicatedStorage:FindFirstChild("Events"):FindFirstChild("PunchAnimation").OnClientEvent:Connect(function(r6Ids, r15Ids, character, punched, waitTime)
08    if character.Name == player.Name and character:FindFirstChild("Torso") then
09        print("passed test")
10        local animation = AnimationLoader(character.Humanoid, r6Ids[math.random(#r6Ids)])
11        wait(waitTime)
12    --  animation:Stop()
13        print("stopped punching")
14    elseif character.Name == player.Name and character:FindFirstChild("UpperTorso") then
15        print("passed test")
View all 21 lines...

it makes error like this: Unable to cast value to Object

Why and how to fix that? Please help.

0
The first argument of FireClient must be the player Amiaa16 3227 — 6y
0
what first arguement sahar1213 72 — 6y
0
What is r6Ids. If it is not a player you can't make it the first argument of :FireClient(). SummerEquinox 643 — 6y

Answer this question