Instead of changing the Y scale of the part to -10 I want to find the currunt Y scale and minus 10 from that. Example: The Y scale is 320 studs -10 =310 studs
local size = Vector3.new(380.5,-10,2318)--What I need help with. local Lava = script.Parent game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() print(player.Name .. " has died!") Lava.Size = size end) end) end)
Try this:
local Lava = script.Parent Lava.Size = Vector3.new(380.5, Lava.Size.Y - 10, 2318)
Then complete the script. Hope this works.
local y = -10 local size = Vector3.new(380.5,y,2318)--What I need help with. local Lava = script.Parent game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() print(player.Name .. " has died!") y = y - 10 --if that's what you're looking for script.Parent.Vector3 = Vector3.new(380.5,y,2318) end) end) end)
Try this out. Hope it works!
Hope this works
local Lava = script.Parent Lava.Size = Vector3.new(380.5,-10,2318) game:GetService('Players').PlayerAdded:Connect(function(player) -- :connect is deprectated use :Connect instead player.CharacterAdded:Connect(function(character) character:WaitForChild("Humanoid").Died:Connect(function() print(player.Name .. " has died!") Lava.Size = Lava.Size - Vector3.new(0, 10, 0) end) end) end)