relopchart.blogg.se

Roblox studio lag
Roblox studio lag







But, since the heartbeat code is running every single frame, using a coroutine to dispatch the work to a different thread that won't start until the next frame won't help much. Your function isn't inside the coroutine, only the connection to the signal is. How would I access an element inside an array inside an array? tx Anyway, any help much appreciated.Īfter suggestions, I have tried this: Hi, I have tried this:Ĭolumns.BrickColor = BrickColor.new("Really blue")Īs an exercise to see if I can get this new concept for me of 'multi dimensional arrays' to work. The fact that the lagginess gets worse and worse seems to suggest memory is not being freed effectively? I assumed this happened automatically. I am very new to lua and trying making games so I really don't know how to improve performance. The gif doesn't really show how laggy, but it gets worse and worse and after about a minute of playing you can hardly control the player effectively.Īs you can see, I tried putting my function inside a co-routine but that didn't help. When I increase the number of platforms etc. V.BrickColor = BrickColor.new("Medium stone grey")īut my project needs more tiles and more colors. V.BrickColor = BrickColor.new("Really red") If (charpos - v.CFrame.Position).magnitude <= 6 then Game:GetService("RunService").Heartbeat:Connect(function() Local newThread = coroutine.create(function() Local hrp = char:WaitForChild("HumanoidRootPart") Local char = workspace:WaitForChild("localPlayer") If string.sub (v.name, 1, 4) = "Part" then

roblox studio lag

The goal was to have a set of tiles change colour when the player steps on it.įor k, v in pairs(game.Workspace:GetDescendants()) do I have finally finished my first script using lua and Roblox studio.









Roblox studio lag