Вот скрипт:
local player = game.Players.LocalPlayer
local screenGui = player:WaitForChild("PlayerGui"
:WaitForChild("ScreenGui"
local label = screenGui:WaitForChild("TextLabel"
local part = script.Parent
local www = 0
local function onTouch(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid"
if humanoid then
www += 1
label.Text = www
end
end
part.Touched:Connect(onTouch)
local player = game.Players.LocalPlayer
local screenGui = player:WaitForChild("PlayerGui"
local label = screenGui:WaitForChild("TextLabel"
local part = script.Parent
local www = 0
local function onTouch(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid"
if humanoid then
www += 1
label.Text = www
end
end
part.Touched:Connect(onTouch)
