When i touched the part the coins are multiplicated and i just want to give them 10 coins but the game can like give 140 coins !!! :(
local lobbyTP = game.Workspace.Lobby.TeleportFinishedParkour script.Parent.Touched:Connect(function(part) for _, plr in ipairs(game:GetService("Players"):GetPlayers()) do plr.Character:SetPrimaryPartCFrame(lobbyTP.CFrame) plr.Stats.Coins.Value = plr.Stats.Coins.Value + 10 end end)
You aren't adding a debounce to prevent the player from getting more than the desired coins
-- also, if you want to give it to one player, don't use a for loop like you did, as that'll give to ALL players local lobbyTP = workspace.Lobby.TeleportFinishedParkour local debounce = false script.Parent.Touched:Connect(function(part) local plr = game.Players:GetPlayerFromCharacter(part.Parent) if plr and not debounce then debounce = true plr.Character:SetPrimaryPartCFrame(lobbyTP.CFrame) plr.Stats.Coins.Value = plr.Stats.Coins.Value + 10 wait(2) debounce = false end end)