I'm making a live bar graph, its made of a bunch of 1pxl wide frames that scale up on the Y to whatever the value is. Though since I need to use so many frames there is no way I could go without removing them after. Here is what I came up with,
function Move()
if tonumber(script.Parent.AbsolutePosition.X) < tonumber(script.Parent.Parent.Parent.Back.AbsolutePosition.X) then
script.Parent:Destroy()
end
end
script.Parent.Changed:Connect(Move)
This is parented to each bar, Back's position is always just off screen and I hate to use AbsolutePosition but I don't see how else I could make it disappear off screen
The problem is the moment the if statement is true the game crashes.
I was thinking it could be my RAM, which this uses a lot of, though when I checked it it was well within the 12GB of RAM I have. And after further testing I realized that it got to different spots with different resolutions before crashing meaning that it couldn't be my memory.
Any ideas on what it could be or how I could fix it?

2 comments
why do you need to make each individual pixel a frame
@thatwalmartman how else would I draw it. Maybe you missunderstood, here is what im doing https://imgur.com/bTXeYpT