#custom events only fire once

1 messages · Page 1 of 1 (latest)

velvet ermine
#

I've made a devforum post, but replies here help too
read the post: https://devforum.roblox.com/t/custom-events-only-fire-once/2648088

velvet ermine
exotic pulsar
# velvet ermine ???
#

looks like the guy has fixed it and got no issue

#

this ```lua
local t = {}

local function createEvent(eventName)
local event = Instance.new("BindableEvent")
event.Name = eventName
return event
end

local myEvent = createEvent("Example")
t.CustomEvent = myEvent.Event

local function playerAdded(player)
player.Chatted:Connect(function(message)
if message:lower() == "test" then
myEvent:Fire(player.Name.." said test!")
end
end)
end

game.Players.PlayerAdded:Connect(playerAdded)

return t

velvet ermine
#

Did you even read the whole post?

#

I said that that was an example.

exotic pulsar
#

According to the example provided, which should be the “custom” events at play.

#

And so with this current information there is absolutely no issue with the example.

velvet ermine
#

Post 4 has my issue.

exotic pulsar
#

Most won’t read that long script, including me

vernal smelt
#

I haven't looked into the script, but maybe your firing the ".Event" thing instead of the actual bindable event?

#

Sorry if this didn't help.