#Trying to make it so when somebody touches the part, it eliminates them but gives than 1+ win

6 messages · Page 1 of 1 (latest)

limber oxide
#

Here's the script...


local function PlayerTouched(Part)
    local Parent = Part.Parent
    if game.Players:GetPlayerFromCharacter(Parent) then
        Parent.Humanoid.Health -= 5
        local p = game.ServerScriptService
        p.Leaderstats.Wins.Value = p.Leaderstats.Wins.Value + 1
        wait(20)
    end
end
Part.Touched:Connect(PlayerTouched)```
honest terrace
#

local Part = game.Workspace["End Part"]

local function PlayerTouched(Part)
local Parent = Part.Parent
if game.Players:GetPlayerFromCharacter(Parent) then
Parent.Humanoid.Health -= 5
local plr = game.ServerScriptService
p.Leaderstats.Wins.Value = plr.Leaderstats.Wins.Value + 1
wait(20)
end
end
Part.Touched:Connect(PlayerTouched)

#

maybe

#

if not try getting rid of
Part.Touched:Connect(PlayerTouched)

#

normally u dont put anything after end lol

steady ibex
#

what's the problem?