Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

my bindable event won't activate, why?

so i made a GUI in startergui and gave it a script that would get activated if you press a certain button and it works just fine, but then i made a thing(don't know what it is called) that would activate an event aswell

local A1Fire = game:GetService("ReplicatedStorage"):WaitForChild("Attack1")

local Action1 = script.Parent.Frame.Action1

local function onAction1Click()
	A1Fire:Fire(Action1)
	print("attack1")
end

Action1.MouseButton1Click:connect(onAction1Click)

and I also made a script that would get activated and print ouch in output

local A1Fire = game:GetService("ReplicatedStorage"):WaitForChild("Attack1")

A1Fire.Event:connect(function()
    print("ouch1")
end)

Can you tell me whats wrong?

3 comments

1

Bindable events are for server-to-server communication only. Use RemoteEvents for server-to-client or client-to-server communication.

0

^^^^^^^^^

0

So where should i put the bindable event in

1 answer

You need to do :FireServer or :FireClient or :FireAllClients, and you shouldn't put the events in the ReplicatedStorage. The workspace works fine.

http://wiki.roblox.com/index.php?title=API:Class/RemoteEvent

8 comments

0

its not a remote event its a bindable event

0

I am blind rip

0

What error do you get?

0

it doesn't say anything thats what's annoying

0

Why do you have 'local function' you dont need that just do function

0

oh ok

0

well i tried it but nothing changed

0

it needs to be remote

This discussion is preserved as it was. New answers, comments, and votes are closed.