Lag Test Script Loading to fast

I’m making a lag test game

The parts that spawn load to fast

Code here

game.Workspace.Part.Touched:Connect(function()
local Run = Instance.new(“ClickDetector”)
Run.Parent = game.Workspace.Part
end)

game.Workspace.Part.TouchEnded:Connect(function()

local TestPart = game.Workspace.Part
local player = game:GetService("Players")

local Amongus = Instance.new(“Part”)

Amongus.Name = "HeadPiece"

Amongus.Parent = workspace

end)game.Workspace.Part.Touched:Connect(function()
local Run = Instance.new(“ClickDetector”)
Run.Parent = game.Workspace.Part
end)

game.Workspace.Part.TouchEnded:Connect(function()

local TestPart = game.Workspace.Part
local player = game:GetService("Players")

local Amongus = Instance.new(“Part”)

Amongus.Name = "HeadPiece"

Amongus.Parent = workspace

end)

The video

robloxapp-20220508-1853037.wmv (106.9 KB)
robloxapp-20220508-1904588.wmv (528.9 KB)

Thanks!

use this

task.wait()

wait(3) -- delay

-- the whole script
1 Like

I tried the script but the parts dont spawn

You should try using the task library instead.

task.wait(3)

maybe you forgot the parts position

Amongus.Position = Vector3.new(1, 16, 1)
1 Like