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

Remote event is not firing?

Asked by 4 years ago

Hello i am making a hack gui. Player with gamepass enters command and then it executes to the whole server (Like changing TV image or something).

I made a script that Fire Remote event when button clicked, but when button is clicked the remote event is not fired. Can someone help?

There is no errors and no mistakes in names.

Local script (StarterGui)

local Event = game.ReplicatedStorage:WaitForChild("HackerGui").TvChangeImage

script.Parent.MouseButton1Click:Connect(function()
    print("Hello")
    Event:FireServer(script.Parent.Image)
end)

Script (ReplicatedStorage, folder called HackerGui)

local Event = script.Parent:WaitForChild("TvChangeImage")

Event.OnServerEvent:Connect(function(Player, NewId)
    print("World")
end)

it prints only 'Hello' but it doesn't print 'World'.

1 answer

Log in to vote
0
Answered by 4 years ago

Scripts and LocalScripts are not fired when they are within ReplicatedStorage.

Ad

Answer this question