Hello, I’m writing a code in which if the player stands on a certain block, he gets a notification with yes / no options and then depending on the answer, there’s a different function running. However, the actual send notification function seems to be sending the yes/no notification across every player in the game, rather than the one who stepped on the block.
Can’t wait for the feedback
local function callback1(Text)
if Text == "Yes" then
game.ReplicatedStorage.RemoteEventsStorage.teleportUser:FireServer(script.TeleportDestination.Value)
end
end
NotificationBindableTeleport.OnInvoke = callback1
for i, child in ipairs(teleportTriggers) do
child.Touched:connect(function(player)
if debounce == false then
debounce = true
game:GetService("StarterGui"):SetCore("SendNotification",{
Title = child.Name;
Text = "Do you want to enter?";
Duration = 5;
Button1 = "Yes";
Button2 = "No";
Callback = NotificationBindableTeleport;
})
script.TeleportDestination.Value = child.Name
wait(5)
debounce = false
end
end)
end