So a player is supposed to step on the brick and then the script is supposed check to see if they are in one of the accepted groups which are listed above the function. After the script makes sure they are in one the groups it searches for all other players in the game in the same group, and gives them money! I'm going to add a visual indicator and a wait after the brick is touched, but I want to make sure my ultimate goal will be achieved before I start messing around with the simple aesthetic stuff. Thank you for your help! :)))))
local marcano = 2959195
local police = 3003695
local point = script.Parent
point.Touched:connect(function(part)
local plr = game.Players:GetPlayerFromCharacter(part.Parent)
print ('The capture point was touched')
if plr then
if plr:IsInGroup(police) or plr:IsInGroup(marcano) then
print ('The player is in an accepted group')
for _,v in pairs(game.Players:GetChildren()) do
if v:IsInGroup(police) or v:IsInGroup(marcano) then
v.Wealth.Money.Value = v.Wealth.Money.Value + 100
else
print ('The player is not in an accepted group!')
end
end
end
end
end)

4 comments
Brooo why did you line all the ends up? Please tell me this isn't your standard...
I have about 6 days of experience so I don't really know any different haha. Can you help me by pointing me in the right direction with this script?
ROBLOX auto tabs scripts. Let ROBLOX do this..
What exactly is the problem? Is there a message in the output? This basically looks okay