In a script I'm working on, when an object touches a part with a fire, it should subtract the position of the part by 0.05. However, when testing the part goes up instead of down. What am I doing wrong?
local CheckFire = require(game.ServerScriptService.ModuleScripts.CheckFire)
script.Parent.Touched:Connect(function(part)
if part:FindFirstChild("Fire") then
part.FireHealth.Value = part.FireHealth.Value - 0.2
part.Fire.Size = part.Fire.Size - 0.2
part.Position = part.Position - Vector3.new(0, 0.05, 0) -- This line right here is what I'm most worried about
part.Size = Vector3.new(part.Size.X - 0.05, part.Size.Y - 0.05, part.Size.Z - 0.05)
if part.Size.X < 5 then
part.Size = Vector3.new(5,5,5)
end
if part.Fire.Size < 5 then
part.Fire.Size = 5
end
CheckFire.CheckFire(part)
end
end)
Thanks!

1 comment
Please post the ModuleScript code.