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

Why does this RemoteEvent script only work in Studio?

Asked by 8 years ago

I am trying to learn RemoteEvent's, I thought I got it to work but this only work's in studio, any suggestions on how to fix it? Output shows no errors, and doesn't print Clicked or Fired even when I use FireAllClients() in the Command Bar.

By the way FilteringEnabled is set to true.

Any help appreciated.

Script to fire it:

local Model = game.Workspace.Model
local Event = Model.RemoteEvent

script.Parent.MouseButton1Click:connect(function()
    print("Clicked")
    Event:FireAllClients()
end)

Script for when it's fired:

script.Parent.OnClientEvent:connect(function()
    print("Fired")
    local m = Instance.new("Message",workspace)
    m.Text = "Test worked."
    wait(2.5)
    m:Destroy()
end)
0
So which one is client? Which one is the server? LateralLace 297 — 8y
0
What? ISellCows 2 — 8y

Answer this question