ErwinK007
(ErwinK007)
#1
Im trying to send over a Enemy (a basic humanoid model) through a remote event.
https://gyazo.com/f6249e43bf57d5e574ff1533d179bbd1
https://gyazo.com/719a2ca23bb18284b8b87560af3c55f3
And it keeps giving me this error.
https://gyazo.com/d55d407dd781fd2f7ed7e8406522b8a1
The Enemy is both on Server and Client side. Server can read it and print its name, but local one is just nil? I dont understand!
‘hit’ is the part (a arm or anything)
Please help me if you know what im doing wrong!
DasKairo
(Cairo)
#2
you might be able to fix it like this:
print("Server: ", hit.Parent.Name)
print("Local: ", Enemy)
Instead of Concatenating with ..
, Just use a Comma
This usually worked for me when i tried to print a table.
ErwinK007
(ErwinK007)
#3
It’s because .OnClientEvent doesn’t provide a Player
as the first arguement (.OnServerEvent does though), you should have this instead:
Connection2 = game.ReplicatedStorage.Spells.OrbOfDestructionEnemy.OnClientEvent:Connect(function(Enemy)
DasKairo
(Cairo)
#5
After Looking back at your script, it appears that it cant find the name of the hit
, thats why you are getting that error
ErwinK007
(ErwinK007)
#6
Oh my god I am so stupid! Thank you!
Ive been up all night working on the game im just too tired…
system
(system)
Closed
#7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.