Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

{Solved}Is it possible to transfer a signal across a script to a local script?

Asked by
Nootian 184
5 years ago
Edited 5 years ago

Instead of using a remote event to transfer a signal from a local script to script, is it possible to transfer a signal across a script to a local script?

How would I do this?

--Script
local Event = script.Parent.RemoteEvent
Event:FireServer()

--Local script
function signal()

end
Event.OnServerEvent:Connect(signal)
0
dont think it is possible without events tigerman1234567hi 5 — 5y

1 answer

Log in to vote
0
Answered by
RBLXNogin 187
5 years ago

Yes. To transfer from script to localScript you use a method known as 'FireClient()".

Code(script):

game:GetService("ReplicatedStorage").RemoteEvent:FireClient(plr)

Code(localScript):

game:GetService("ReplicatedStorage").RemoteEvent.OnClientEvent:Connect(function(plr)
    print("fired")
end)

This is how you would fire a signal from a script to a localscript.

Links that will help you:

ROBLOX Remote Event tutorial (Everything you need to know)

and

Roblox Filtering Enabled Tutorial - RemoteEvents (Part 1)

Your welcome :)

0
Your welcome :) all that's left is for you to click the green checkmark and acknowledge that your problem is solved. RBLXNogin 187 — 5y
0
Thank you! Nootian 184 — 5y
Ad

Answer this question