I'm wanting to have 2+ players who can stand on a floor and earn money once every second. I need to know what function/event/whatever I can use to accomplish this. Any help is appreciated.
I did something similar to this once with Touched
instead of Region3
s. The way I did it was by using tables.
Here's a quick example:
local trigger = workspace.Part local players = {} trigger.Touched:Connect(function(part) local plr = game:GetService("Players"):GetPlayerFromCharacter(part.Parent) if plr then for i,v in pairs(players) do if v ~= plr.Name then table.insert(players,plr.Name) end end end end) trigger.TouchEnded:Connect(function(part) local plr = game:GetService("Players"):GetPlayerFromCharacter(part.Parent) if plr then for i,v in pairs(players) do if v == plr.Name then table.remove(players[i]) end end end end)
Then you can just determine who's on the part based on the values in the table