local TimerDisplay = game.StarterGui.TimerGui.TimerDisplay local part = script.Parent local Display = game.StarterGui.TimerGui.TimerDisplay script.Parent.Touched:Connect(function(hit) local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) if player then Display.Text = player.Name.." wins!" player.leaderstats.Wins.Value += script.Parent.ToAddWins.Value player.leaderstats.Cash.Value += script.Parent.ToAddMoney.Value wait() end end)
when i try to do that script it only adds the win value not both and not displaying the player name who touch the part
`
local part = script.Parent local sht = part.ToAddWins local shp = part.ToAddMoney local Status = game:GetService("ReplicatedStorage"):WaitForChild("Status") part.Touched:Connect(function(hit) local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) player.leaderstats.Wins.Value += sht.Value player.leaderstats.Cash.Value += shp.Value Status.Value = player.Name.. " wins!" wait(5) end)