- What do you want to achieve? Keep it simple and clear!
Communication between two local scripts.
- What is the issue? Include screenshots / videos if possible!
The scripts are for a menu system, I have a Surface GUI in starter GUI, adornee is set to an object that my camera is looking at, there is a local script underneath the image button, (purple dot in image 1) which can functionally detect when the button is pressed, and :Fire()s the bindable event, with a test case, I confirmed that scripts works, just fine.
The other script, located under starterGUI aswell, (red dot image 2) is supposed to receive the bindable event, but it does not.
-
What solutions have you tried so far?
Using bindable functions and remote events instead, I’ve looked for other solutions and I am aware there are multiple posts about this, but all of the solutions given I have already applied.
Script under image button.
local btn = script.Parent
local RS = game:GetService("ReplicatedStorage")
local Event = RS.MainMenuEvents.TeamsClicked
btn.Activated:Connect(function()
Event:Fire()
print("Sent")
end)
Receiver portion of other script.
local TeamsClicked = RS.MainMenuEvents.TeamsClicked
TeamsClicked.Event:Connect(function()
print("Received")
end)