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

Help with RemoteEvent's?

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.

2 comments

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

0

Putting it in LocalScript or ServerScript doesn't work either.

1 answer

✓ Accepted answer

A Script won't run in ReplicatedStorage.

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

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