Hi dark,
The reason it's giving you that error is because the SIze is a Vector3 value, and you're comparing it to a Number value. So, I recommend to compare it to the Vector3 value.
####Something like this:
local event = script.Parent:WaitForChild("Events").Mow
event.OnServerEvent:Connect(function(plr, target)
if target.Size > Vector3.new(0, 0.2, 0) then
target.Size = target.Size - Vector3.new(0,0.1,0)
target.CFrame = CFrame.new(target.Position - Vector3.new(0,0.05,0))
else
print(target.Size)
end
end)
###Or, if you wanna compare only the y axis of the Size, then this is how you'd do it:
local event = script.Parent:WaitForChild("Events").Mow
event.OnServerEvent:Connect(function(plr, target)
if target.Size.Y > 0.2 then
target.Size = target.Size - Vector3.new(0,0.1,0)
target.CFrame = CFrame.new(target.Position - Vector3.new(0,0.05,0))
else
print(target.Size)
end
end)
##Hope I helped and have a wonderful day/night.
Thanks,
Best regards,
~~ KingLoneCat
2 comments
KING LONE, LONG TImE NO SEE DUDE :D
Yeah, it's been a while. How's it going?