My script:
player = game.Players.LocalPlayer
got = {}
print("SET UP GOT TABLE")
script.Parent.Touched:connect(function(part)
if part.Parent.findFirstChild("Humanoid") ~= nil then
print("HUMANOID TOUCHED IT")
local c = 0
for key, value in pairs(got) do
print("CHECKING FOR ALREADY GOT")
if value ~= player then
c = c + 1
if c == #got then
print("DOESNT HAVE")
_G.Coins = _G.Coins + 1
part.Parent.Torso.CFrame = CFrame.new(Vector3.new(-16.1, 3, -219))
got[1] = player
print("GAVE PLAYER COIN!")
end
end
wait()
end
print("ENDING PLAYER CHECK")
end
print("ENDING SCRIPT!")
end)
You should get the coin, it tp's you away, then prevents you from getting it again.
Why isn't it working?

1 comment
Yeah. I could. Not a helpful answer.