I have come across this problem some time ago. It was annoying, and i didn’t know why it happened, but now it happened again in a different script. But now I see what is going on.
This is the piece of the script that crashes studio: (With the variable supports being a table with many parts)
local highest = supports[1]
local plrpos = plr.Character.Entity.Position
for i,v in supports do
if (v.Position - plrpos).Magnitude <= (highest)
end
As you can see, there is obviously an error, that’s because I can’t finish typing the function, since it crashes in line 4 when i try to do highest.Position. I don’t know why this happens, but I use this exact condition all the time when scripting, and it’s not easy to script when studio keeps crashing
New problem: When I type the condition on notepad then paste it to the script editor, it works fine, and you might think the problem is solved now, but it just gets worse. Just by HAVING this specific condition anytime you try to do variable. or variable: studio crashes. So if i try typing workspace.Terrain its gonna crash
Like i said, i can’t finish typing the if ... then because it crashes before I’m able to, also this is kinda enough piece of code, the rest of the code is non sense and just related to my game. The main factor crashing studio is comparing 1 Magnitude with another Magnitude