Whats up with my part script, has it gone insane!?
So I have a incredibly simple script to create a part and set a few of its values.
01 | local NewPart = Instance.new( "Part" ) |
02 | NewPart.Parent = Model |
03 | local newPartName = "NewPart" |
04 | NewPart.Name = newPartName |
05 | local newPartCFrame = CFrame.new( 0 , 1.5 , 0 , 1 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1 ) |
08 | NewPart.CFrame = newPartCFrame |
09 | local newPartSize = Vector 3. new( 50 , 1.2 , 50 ) |
10 | NewPart.Size = newPartSize |
11 | NewPart.Anchored = true |
Ya, looks simple enough but what happens when I run the script confuses me completely.
The results of the script were:
As you can see the results of the script were far from what I told it to do. I told it to change the position and rotation to simple values and it changed them to randomly complex values! I DID NOT tell it to do anything with the RotVelocity or the Velocity but it changed them as well!
Note: I did try this script several more times with different values but the results did not change the random chaos.
Does anyone know why this is happening and how to fix it!?