Hey guys, I’m Max. I want to create a Fire simulation on my roblox building to test how well it would go and if it would fall. I currently have a model but it is wayyyy too laggy and drops you down to 9 fps. Just wondering if anyone out there can help!
-
What do you want to achieve?
A non laggy fire simulation for my building -
What is the issue?
I have made one but it is wayyyyy too laggy -
What solutions have you tried so far?
I have looked for solutions but to no luck.
Code (inside a part):
script.Parent.Touched:Connect(function(hit)
if hit:FindFirstChild("Fire") or hit:FindFirstChild("Smoke") or hit:FindFirstChild("Script") or hit.Parent:FindFirstChild("Humanoid") ~= nil then
return nil
elseif hit.Locked == true then
return true
elseif hit.Name == "Baseplate" then
return true
elseif hit:FindFirstChild("Fire") or hit:FindFirstChild("Smoke") == nil then
local fire = script.Parent.Fire:Clone()
local smoke = script.Parent.Smoke:Clone()
fire.Parent = hit
smoke.Parent = hit
local scriptc = script:Clone()
scriptc.Parent = hit
wait(math.random(10, 60))
hit.Anchored = false
hit:BreakJoints()
wait(math.random(60, 180))
script.Parent:Destroy()
end
end)
and here is the full model:
(5) Start Fire - Roblox
Any help would be great!