Hello I am trying to send a notification to all client so a gui pops up whenever a player is in a certain area, but I’m having a problem.
As you can see in the photo, it keeps saying FireAllClient is not a valid member of the RemoteEvent.
Here is the server script
while wait(1) do
for i,v in pairs(regions:GetChildren()) do
touching = false
local region = Region3.new(v.Position - (v.Size/2), v.Position + (v.Size/2))
local parts = game.Workspace:FindPartsInRegion3WithWhiteList(region,game.Workspace:GetChildren())
for _, part in pairs(parts)do
if part.Parent:FindFirstChild("Humanoid") then
touching = true
replacement = part.Parent
break
else
touching = false
end
end
if touching == true and debounce == false then
debounce = true
local player = game.Players:GetPlayerFromCharacter(replacement)
local navy = player:FindFirstChild("UnsavedStats"):FindFirstChild("Navy")
---------------------
if navy.Value == true and capturePoint.Value >= 0 and capturePoint.Value <= 30 then
capturePoint.Value = capturePoint.Value + 1
print(capturePoint.Value.. "good")
remote:FireClient(player,navy.Value,capturePoint.Value)
if notificationValue ~= 1 then
notificationValue = 1
wait()
notificationEvent:FireAllClient(navy.Value,island,capturePoint)
end
end
end
end
end
Client script
notification.OnClientEvent:Connect(function(navy,island,capturePoint)
if navy.Value == true and capturePoint.Value >= 0 and capturePoint.Value <= 30 then
StarterGui:SetCore("SendNotification",island.."is being captured",island.."is being captured by the Navy!")
end
end)
Thank you for reading