✓ Accepted answer
All you would need to do, is something like this:
Touching={}
platform.Touched:connect(function(hit)
local Valid=true
local player = hit.Parent
if player.Character:FindFirstChild("RobberMatchTag") then
local robber = player
for i=1, #Touching do
if Touching[i]==robber then
Valid=false
end
end
if Valid==true then
Touching[#Touching+1]=robber
end
end
end)
platform.TouchEnded:connect(function(hit)
local player = hit.Parent
if player.Character:FindFirstChild("RobberMatchTag") then
local robber = player
for i=1, #Touching do
if Touching[i]==robber then
Touching[i]:remove()
end
end
end)
I think this should work. If you have any problems please leave a comment below. Hope I helped :P
2 comments
Thank you for a really quick answer! :D
No prob, glad I could help :P