#event providing Nil

45 messages · Page 1 of 1 (latest)

lavish storm
#

let me get this staright, you are providing an instance i.e the door as an argument when fireing to the client?

grave heron
#

this works when I add like a wait(25) to the first script for some reason

#

but I cant just add a 25 second wait gap between the door getting destroyed

lavish storm
#

Huh are you sure??

grave heron
#

I really have no idea whats going on im not that good at scripting

grave heron
lavish storm
#

Because if you pass an instance as an argument, roblox will deserialize it into a string

#

not deserialize just converts it into a string

#

thats what iknow

#

try printing one

grave heron
#

alright ima try that

lavish storm
#

and like print typeof

#

try print(typeof(one))

#

does it say string

grave heron
#

does nothing..?

lavish storm
#

on the local script

grave heron
#

local event = game.ReplicatedStorage:WaitForChild("DoorEvent")
event.OnClientEvent:Connect(function(One)
print(One)
print(typeof(One))
if script.Parent.Parent.leaderstats.Stage.Value == 1 then
One:Destroy()
end
end)
I did this

#

yea

#

did that

lavish storm
#

what does it print

grave heron
#

Nothing

lavish storm
#

wdym, are you not fireing the remote

grave heron
#

thats what im wondering I did trigger the proximityprompt

lavish storm
#

printe hello

#

I mean it should print soething

#

something even with one

grave heron
#

oh wait nvm I just didnt have 300 coins

#

It does say instance

#

not string

#

and it also says the instance name

lavish storm
#

and it still says nil

grave heron
#

No it destroyed it now

lavish storm
#

...

grave heron
#

WELL WHAT THE HELL JUST HAPPEND

lavish storm
#

what did u even change

grave heron
#

oh shit wait

#

I added :waitforchild in the server script

#

maybe the door wasnt loading

lavish storm
#

oke

grave heron
#

like child in workspace takes some time after the game is launched

grave heron
lavish storm
#

U kinda solved it on ur own

grave heron
#

But you still helped

#

or intented to

#

and I appriciate it