So I recently got in to scripting and I learned about Instance.new but it just at random stopped working.
See it appears and then it disappears I don’t get it
So I recently got in to scripting and I learned about Instance.new but it just at random stopped working.
See it appears and then it disappears I don’t get it
Could be a few things, but the most likely is that the part is positioned by default somewhere that is below your terrain. You’ll have to probably put the Instance.new return into a variable and set the Position somewhere above the terrain, my guess is that the default position is 0,0,0
, so again, you have to position it yourself. Example
local part = Instance.new("Part")
part.Position = Vector3.new(100,100,100)
part.Parent = workspace
Also I recommed not using the 2nd parameter of Instance.new, if you’re setting a lot of properties, it’ll cause a slow down, only Parent the new instance after you set the properties
I think you need to make a function for it or maybe you have a plug-in or script that cleans up unnecessary stuff in the workspace, unsure.
Created parts are unanchored, and are positioned at 0, 0, 0. The part is being deleted because it is hitting the minimum destroy height. Try changing the position and if its being anchored before setting the parent.
Thank you you were right I was stuck on this for a whole day
Anytime! if you have anymore issues don’t be afraid to make another post!