#Mystery doors not working
1 messages · Page 1 of 1 (latest)
thats the script for em:
local Workspace = game:GetService("Workspace")
local Local = {}
local Shared = {}
function Shared.OnStart()
math.randomseed(time() * tick())
Local.SetupMysteryDoors()
end
function Local.SetupMysteryDoors()
for _, descendant in Workspace:GetDescendants() do
local isDoorModel = descendant.Name == "Door" and descendant:IsA("Model")
if not isDoorModel then continue end
local killDoor = math.random(1, 2)
local doorsFounds = 0
for _, child in descendant:GetChildren() do
local isDoorPart = child.Name == "Door" and child:IsA("Part")
if not isDoorPart then continue end
doorsFounds += 1
child.CanCollide = doorsFounds == killDoor
if doorsFounds == killDoor then
child:SetAttribute("Damage", 999)
end
end
end
end
return Shared
Hold on im looknig at the text
dont do :GetService("Workspace")
do
if its localscript do game:WaitForChild("Workspace")
if its a normal script, do workspace
its modulescript
OHH
Come dms i have the solution
so what do i do to fix it
** You are now Level 1! **
😮
so do you have solution?
K
I helped him
oh