Bindable Not Being Received Or Fired

I have this script that sends a bindable event

local ClonedScript = game.ServerScriptService.ClonedScripts:FindFirstChild("HatchingTimeScript"):Clone()
					ClonedScript.Parent = eggValue--Parent the script to the egg folder
					local HatchingTimeEvent = ClonedScript:FindFirstChild("HatchingTimeEvent")
					HatchingTimeEvent:Fire()--Fire the bindable event so the script starts to work
					print("fired")

The print prints so apparently it’s firing but the script that receives it isn’t printing anything even though it has a print meaning it’s somehow not receiving it, which I don’t know why.

local BindableEvent = script:FindFirstChild("HatchingTimeEvent")

local function deductTime()
	print("got the event")

end

BindableEvent.Event:Connect(deductTime)

image

Thanks!

I believe it has to do with you cloning it and the .Event connection not connecting to the cloned script. Where is the deductTime() script located? An easier and probably the most efficient way is to probably put the BindableEvent in ReplicatedStorage. This way all the scripts can access it.

Well in another script which also clones an object and sends a bindable event it works for some reason

   local newTemplate = script.PetTemplates:FindFirstChild(pet):Clone()|
    
   	local newTemplate = script.PetTemplates:FindFirstChild(pet):Clone()
	newTemplate.Name = pet
	newTemplate.Parent = scrollingFrame
	local SessionID = newTemplate.SessionID
	SessionID:Fire(pet, ID, Level)--Makes the pet stats show the correct level 

I also only want it to fire to that one cloned script.

Still haven’t found what’s wrong. This seems so simple to do.

Are both of the samples of code from server scripts?

Yes both of the scripts are server scripts

Do you see any errors, and can you tell me where the top code script is?

I don’t get any errors and the top script is the one that is highlighted in this photo
image

I haven’t personally used bindable events, so I’ll try replicating this and getting back to you if I solve the problem.

1 Like

@MasterStudioWorld BindableEvents are basically opposite RemoteEvents if I’m correct, anyways could you try just making it a global function instead?

I just tried nearly exactly what he did and it recieved the fire and printed what I told it to, I can’t find the problem.

It’s probably just something that’s relevant to the amount of cloning that’s happening?

I copied their code and removed the cloning part and it worked just fine.