Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How to fix this script?

Asked by 11 years ago

Everytime this script runs, it makes the mesh completely invisible for a split second. I was wanting to know if there was a way to make this stay opaque the whole time, and not flash.

1while true do
2    wait(0.001)
3    script.Parent.MeshId = "http://www.roblox.com/asset/?id=11597751"
4    wait(0.001)
5    script.Parent.MeshId = "http://www.roblox.com/asset/?id=115975859"
6    wait(0.001)
7    script.Parent.MeshId = "http://www.roblox.com/asset/?id=115973891"
8end

1 answer

Log in to vote
3
Answered by
Vathriel 510 Moderation Voter
11 years ago

Use preload! The reason for using preload is that roblox normally doesn't load objects until the object is actually put into use. By using preload we are able to load things first so that appear more smoothly. This can also be done with sounds, and I'm sure a few other assets ingame.

01Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=11597751")
02Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=115975859")
03Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=115973891")
04while wait() do
05    script.Parent.MeshId = "http://www.roblox.com/asset/?id=11597751"
06    wait()
07    script.Parent.MeshId = "http://www.roblox.com/asset/?id=115975859"
08    wait()
09    script.Parent.MeshId = "http://www.roblox.com/asset/?id=115973891"
10end
Ad

Answer this question