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

Help with RemoteEvent's?

Asked by 8 years ago

I've been trying to figure out how to use RemoteEvent's, can someone tell me why this script won't work properly? It doesn't make the message or anything.

Script inside the RemoteEvent:

script.Parent.OnServerEvent:connect(function()
    local m = Instance.new("Message",workspace)
    m.Text = "asd"
end)

Script to fire it:

game.ReplicatedStorage.Events.RemoteEvent:FireServer()

Any help appreciated.

0
you say you are running it with the command bar? the bar is not server or client sided and has no parent. avoid using it for this lukeb50 631 — 8y
0
Putting it in LocalScript or ServerScript doesn't work either. ISellCows 2 — 8y

1 answer

Log in to vote
1
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
8 years ago

A Script won't run in ReplicatedStorage.

Put the listening script into ServerScriptService and refer to the event as game.ReplicatedStorage.Events.RemoteEvent.

Ad

Answer this question