So basically what I am trying to do is send information from a client to the module script which will then send information back to a local script. I’m not exactly sure what I am doing wrong. But here is my scripts:
– local script 1:
local plr = game.Players.LocalPlayer
local rs = game.ReplicatedStorage
local reward = 500
script.Parent.MouseButton1Click:connect(function()
rs.Event:FireServer(plr,reward)
end)
– local script 2:
local rs = game.ReplicatedStorage
rs.Event.OnServerEvent:connect(function(plr,reward)
rs.Event2:FireClient(plr,reward)
end)
Expanding on that–If it’s two LocalScripts, you can use a BindableEvent instead. If your second script is actually a ModuleScript, you don’t even need Bindables/Remotes. Just create and export a function to handle it.