So i have a sled/part where I clone a part and weld it to that part, when player collects snow i want that part to go up, but it also does so from the bottom.
How do i make it only go up from the top face?
local TweenService = game:GetService("TweenService")
local sledEvent = game.ReplicatedStorage:WaitForChild("sledLocalEvent")
sledEvent.OnServerEvent:Connect(function(plr)
local playerFolder = plr:WaitForChild("playerFolder")
local leaderstats = plr:WaitForChild("leaderstats")
local playerSledFolder = plr.Character:WaitForChild("sledFolder")
local playerSled = playerSledFolder:WaitForChild("SledPart")
local maxCapacity = playerFolder.sledMaxCapacity.Value
local maxHeight = 20
local snowVisual = playerSledFolder:WaitForChild("SnowVisual")
local currentSnow = leaderstats.Snow.Value
local heightProportion = currentSnow / maxCapacity
local newYHeight = maxHeight * heightProportion
newYHeight = math.clamp(newYHeight, 0, maxHeight)
local originalTopPosition = snowVisual.Position + Vector3.new(0, snowVisual.Size.y / 2, 0)
snowVisual.Size = Vector3.new(snowVisual.Size.X, newYHeight, snowVisual.Size.Z)
local newTopPosition = snowVisual.Position + Vector3.new(0, snowVisual.Size.y / 2, 0)
snowVisual.CFrame = snowVisual.CFrame * CFrame.new(originalTopPosition - newTopPosition)
playerSled.Billboard.Text.Text = currentSnow .. "/" .. maxCapacity .. "☃️"
end)