Hi, I was working on getting this script to send a notification to the player whenever one of the hunter has a spectate tool equipped. I'd like to keep it a localscript.
repeat wait() until game.Players.LocalPlayer.Character:IsDescendantOf(workspace)
local Character = game.Players.LocalPlayer.Character
function CHECK_TOOL(character)
for _, v in pairs(character:GetChildren()) do
if v:IsA("Spectate") then
game:GetService("StarterGui"):SetCore("SendNotification", {
Title = "Spectate Detected!";
Text = "Hide!";
})
end
end
end

1 comment
I'd send the notification every time the hunter equips the spectate tool. https://developer.roblox.com/en-us/api-reference/class/Tool also if you are wanting to send a notification to all players from a local script then you need to look into remote events/functions.