Why It Gives me 3 Points when I touch the Part?
01 | game.Players.PlayerAdded:Connect( function (plr) |
02 | local stats = Instance.new( "StringValue" , plr) |
04 | stats.Name = "leaderstats" |
06 | local wins = Instance.new( "IntValue" , stats) |
11 | script.Parent.Touched:Connect( function (hit) |
12 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
13 | if hit.Parent.Humanoid.Health > 0 then |
15 | if debounce = = false then |
19 | script.Parent.Touched:Connect( function (hit) |
20 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
21 | wins.Value = wins.Value + 1 |
22 | hit.Parent.HumanoidRootPart.CFrame = CFrame.new( 234 , 45.906 , - 114 ) end end ) |
So Basically, when you touch the part, its supposed to give you 1 win only, but however it gives me 3 wins