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

Model doesn’t get destroyed using remote function ?

Asked by
eyad27 8
4 years ago
01TS.OnServerInvoke = function(player,car,hum,particle,Helmet,costume,copycat,weld)
02     hum.WalkSpeed = 0
03     wait(0.5)
04     local new = Instance.new("Animation")
05     new.AnimationId = changeid
06     local newtrack = hum:LoadAnimation(new)
07     newtrack:Play()
08     wait(1)
09     costume = particle:Clone()
10     costume.CFrame = car.UpperTorso.CFrame * CFrame.new(0,5,0)
11     costume.Anchored = true
12     costume.Parent = car.UpperTorso
13     wait(1)
14     hum:RemoveAccessories()
15     copycat = Helmet:Clone()
View all 56 lines...

So, I tried destroying a model in a remote function, but it didn’t work. I used Debris and Destroy and returned the function. Any idea ?

0
connect functions matiss112233 258 — 4y
0
How do I connect it ? eyad27 8 — 4y

1 answer

Log in to vote
0
Answered by
Necro_las 412 Moderation Voter
4 years ago

Maybe is because of your invoke method. Try using instead of

1TS.OnServerInvoke =
2function()

write

1local function function_name(player and etc)
2    -- etc
3end
4 
5TS.OnServerInvoke = function_name
0
Is that in the local script eyad27 8 — 4y
0
No, on server script. If you use OnServerInvoke it has to be in server script, otherwise is OnClentInvoke Necro_las 412 — 4y
0
err i dont think that works, i think u shoudl connect Erie20 102 — 4y
0
How ? Mind giving an example ? eyad27 8 — 4y
0
what did you put in the local script @eyad27 ? Necro_las 412 — 4y
Ad

Answer this question