You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to make it so that however many players touched a part, it will give a point to them all. -
What is the issue? Include screenshots / videos if possible!
Currently, it gives a point to only 1 player who touches the point. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I couldn’t find anything on multiple players touching a part, but I tried to make a table for players touching a part, it isn’t working however.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local levels = workspace:GetDescendants()
for i, child in pairs(levels) do
if child:IsA("BasePart") and child.Name == "GuessGiver" then
local debounce = true
child.Touched:Connect(function(hit)
local plrstats = game:GetService('Players'):GetPlayerFromCharacter(hit.Parent)
if plrstats and debounce then
debounce = false
plrstats.leaderstats.Guessed.Value = plrstats.leaderstats.Guessed.Value +1
wait(2)
debounce = true
end
end)
end
end