Lately, i’ve enjoyed making pointless creations for entretainment and leaning how to script.
However one of my pointless projects isn’t working properly. What do i want to achieve? Repeat the part creation every 5 seconds. What is the issue? The part is only created once. What solutions have i tried so far? Moving my variables and making while loops. The code below is the code before i moved the variables around and used the loops.
--One-Letter Variables
local w = game.Workspace
local p = Instance.new("Part")
local m = Instance.new("SpecialMesh", p)
local c = w.DogeSpawn
--Two-letter Variables
local dm = "http://www.roblox.com/asset/?id=151778863"
local dt = "http://www.roblox.com/asset/?id=151778895"
local mr = math.random(0, 15000)
local nt = {"The Glorious Doge #", "much name, so doge #", "Teh EPIC Doge #", "Doge #", "Doge Victor Bob David Robert Douglas the ", "cyb3Rd0g3 0f t3H PwNage #"}
--Doge Transformation
m.MeshId = dm
m.TextureId = dt
p.Anchored = false
p.Parent = w
p.CFrame = c.CFrame
p.Name = nt[math.random(#nt)]..mr
while wait(5) do
--One-Letter Variables
local w = game.Workspace
local p = Instance.new("Part")
local m = Instance.new("SpecialMesh", p)
local c = w.DogeSpawn
--Two-letter Variables
local dm = "http://www.roblox.com/asset/?id=151778863"
local dt = "http://www.roblox.com/asset/?id=151778895"
local mr = math.random(0, 15000)
local nt = {"The Glorious Doge #", "much name, so doge #", "Teh EPIC Doge #", "Doge #", "Doge Victor Bob David Robert Douglas the ", "cyb3Rd0g3 0f t3H PwNage #"}
--Doge Transformation
m.MeshId = dm
m.TextureId = dt
p.Anchored = false
p.Parent = w
p.CFrame = c.CFrame
p.Name = nt[math.random(#nt)]..mr
end