#Help

20 messages · Page 1 of 1 (latest)

vast garden
#
local tool = script.Parent

-- Pobierz obiekt o nazwie "snieg"
local snow = workspace:FindFirstChild("snieg")



-- Funkcja, która zostanie wywołana, gdy narzędzie zostanie aktywowane (kliknięte)
local function onToolActivated()
    -- Sprawdź, czy obiekt istnieje
    if snow then
        -- Zmniejsz rozmiar obiektu o 10% tylko w osi Y
        local newSizeY = snow.Size.Y * 0.9
        snow.Size = Vector3.new(snow.Size.X, newSizeY, snow.Size.Z)

        -- Przesuń obiekt w dół o 5% jego aktualnej wysokości
        local newPositionY = snow.Position.Y - (snow.Size.Y * 0.05)
        snow.Position = Vector3.new(snow.Position.X, newPositionY, snow.Position.Z)



        -- Sprawdź, czy rozmiar Y obiektu jest mniejszy od minimalnej wartości
        if snow.Size.Y < 0.5 then
            snow:Remove()
        end
    end
end

tool.Activated:Connect(onToolActivated)

this is my tool script for make a object smaller

#

won't add plus 1 to my leaderboard

sage dustBOT
#

studio** You are now Level 1! **studio

vast garden
#

game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player

-- Create the 'Money' statistic
local Money = Instance.new("IntValue")
Money.Name = "Money"
Money.Value = 0 -- You can set an initial value if needed
Money.Parent = leaderstats

-- Create the 'Snow' statistic
local Snow = Instance.new("IntValue")
Snow.Name = "Snow"
Snow.Parent = leaderstats

end)

soft pendant
#

Do you even have code that’s supposed to add 1 to your leaderboard?

vast garden
#

yea

soft pendant
#

Well, show it

vast garden
#

it was but it didn't work

#

local tool = script.Parent

-- Pobierz obiekt o nazwie "snieg"
local snow = workspace:FindFirstChild("snieg")

local player = game:GetService("Players")

-- Funkcja, która zostanie wywołana, gdy narzędzie zostanie aktywowane (kliknięte)
local function onToolActivated()
-- Sprawdź, czy obiekt istnieje
if snow then
-- Zmniejsz rozmiar obiektu o 10% tylko w osi Y
local newSizeY = snow.Size.Y * 0.9
snow.Size = Vector3.new(snow.Size.X, newSizeY, snow.Size.Z)

    -- Przesuń obiekt w dół o 5% jego aktualnej wysokości
    local newPositionY = snow.Position.Y - (snow.Size.Y * 0.05)
    snow.Position = Vector3.new(snow.Position.X, newPositionY, snow.Position.Z)

    player.leaderstats.Snow.Value += script.Parent.Value

    -- Sprawdź, czy rozmiar Y obiektu jest mniejszy od minimalnej wartości
    if snow.Size.Y < 0.5 then
        snow:Remove()
    end
end

end

tool.Activated:Connect(onToolActivated)

#

and wants to give it that every block dig up too

#

as

azure trellis
#

i would like to help

vast garden
#

it's already added to my leaderboard but there's a problem that no matter where I click it gets dig anyway, and I'd like to make it so that where you see an overview it gets dig there

azure trellis
#

yeah i dont actually know that language but i imagine that you're doing like some excavation system?

#

just as an idea

#

you would do a touch to the snow and then u can check if it was touched by the thing to excave

#

then u do a lot of more things obviusly

#

but, hope it helps