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

help with sending notifications with remoteevents?

Asked by 6 years ago

Okay, so what I wanted to do is to make it so that if an admin pressed an Imagebutton, a notification gui would pop up on the screens of every client on the server. This is what I have so far: local

event.OnClientEvent:connect(function()
    local notification = game.Players.LocalPlayer.PlayerGui:WaitForChild("notification"):WaitForChild("notification")
    notification:TweenPosition(UDim2.new( 0.312, 0, 0.686, 0), "In", "Sine", 0.5)
end)

post.MouseButton1Click:connect(function()
    event:FireServer()
end)

server

local event = game.ReplicatedStorage:WaitForChild("RemoteEvent")

event.OnServerEvent:connect(function()
    event:FireAllClients()
end)

The problem is when the admin clicks on the imagebutton that is supposed to move the notificationgui to everyone's screens, it only moves it on their own screen. (btw. the notificationgui is in StarterGui, so everyone has it already)

0
i think .OnServerEvent requires the Player argument, so try `event.OnServerEvent:connect(function(player)` creeperhunter76 554 — 6y
0
maybe use a separate events , one for from the client to the server, and one for from the server to all clients abnotaddable 920 — 6y

Answer this question