#REMOTEEVENTS
26 messages · Page 1 of 1 (latest)
the DUDE variable
is a character
not a player
you cannot fire characters
consider using game.Players:GetPlayerFromCharacter(DUDE)
np
you can mark it as Solved now
Show me the error
the error contains valuable information
DUDE is either a character or a player
if DUDE is a player itll error considering the lines at the top refer to DUDE like a player
can you put print(DUDE) below line 17
** You are now Level 5! **
try replacing the line with print(DUDE.Parent)
incase youre wondering im trying to debug your issue
okay
delete the line
replace line 18,19 with
local TARGETD = game.Players:GetPlayerFromCharacter(DUDE)
if TARGETD then
game.ReplicatedStorage.Cuffed:FireClient(TARGETD)
end
it should work
the reason why it errored is because you tried to FireClient to a NPC
in theory, checking if DUDE is a player should work fine
and thats what i did there
np!