Slastraf Posted February 9, 2019 Share Posted February 9, 2019 if self.face:GetScale().x > 0.001 then local newscale = Math:Lerp(self.face:GetScale().x,0,.1) self.face:SetScale(Vec3(newscale,newscale,newscale)) end If you set the scale of a model to a value with many decimal places, LE will crash without warning. Code snippet above will crash without if case Quote Link to comment Share on other sites More sharing options...
Josh Posted February 10, 2019 Share Posted February 10, 2019 What is the value that crashes it? I could see 0 causing this. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Slastraf Posted February 10, 2019 Author Share Posted February 10, 2019 4 hours ago, Josh said: What is the value that crashes it? I could see 0 causing this. I have not exactly tested this, but if you put this in a n update function it will crash, so after it gets called often times when the value should be very low, probably 0 but it should not at exactly 0. Perhaps with a number that has too many bits from too many decimal places Quote Link to comment Share on other sites More sharing options...
Josh Posted February 11, 2019 Share Posted February 11, 2019 You are very likely causing a divide by zero to occur. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.