script
--Colors for difficulties--
local difficulties = {
Freebie = Color3.fromRGB();
Easy = Color3.fromRGB();
Intermediate = Color3.fromRGB();
Hard = Color3.fromRGB();
Intense = Color3.fromRGB();
JustOverallPainful = Color3.fromRGB();
KIRBO = Color3.fromRGB();
}
--Parts--
local Part = game.Workspace.Part
local PartName = Part.Name
--Debounce--
local Debounce = false
--function--
Part.Touched:Connect(function(Hit)
if not Debounce then
Debounce = true
local CharacterName = Hit.Parent.Name
game.StarterGui:SetCore("ChatMakeSystemMessage", {
Text = "[BadgeNotification]"..CharacterName.." Got "..PartName.."!";
Color = difficulties["Freebie"];
Font = Enum.Font.SourceSansBold;
TextSize = 18;
})
wait(10)
Debounce = false
end
end)
So basically if i touch the part the debounce will only be for me only and not the other players. It’s basically the debounce is client sided.
Valkyrop
(JustAGuy)
#2
You could simply use a local script for this ,
And in this case, when Player1 touches it, that won’t affect Player2 when he touches it.
One method is to track the debounce for each player using a dictionary.
it is a local script. Core ui’s only work local.
Valkyrop
(JustAGuy)
#5
Then that’s great.
I don’t see any problem here then,
If it was a server-sided script, I’d recommend using what @dthecoolest offered,
but since it’s a local script, you dont have to worry about this. Since it will only affect the local player, and not others.
i tried testing it with 2 players and it does not work…
Valkyrop
(JustAGuy)
#7
Then something else in your code didnt work.