You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
An entity that breaks lockers for my rooms fangame -
What is the issue? Include screenshots / videos if possible!
It does nothing -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Simplifying the code
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local function A200Entity()
script.Parent.Parent.A200Cue:Play()
game.Lighting.Filmic.Enabled = true
wait(30)
for i, obj in pairs(Room:GetChildren()) do
if (obj.Name == "Locker" and obj.ClassName == "Model") or (obj.Name == "SafeLocker" and obj.ClassName == "Model") or (obj.Name == "Fridge" and obj.ClassName == "Model") then
obj:Destroy()
end
if (obj.Name == "Shelf" and obj.ClassName == "Model") then
obj:Destroy()
end
end
local A200 = game.ReplicatedStorage.A200:Clone()
A200.Parent = workspace
A200["A-200"].Position = workspace.Start.Exit.Position
A200["A-200"].Static.Playing = true
A200["A-200"].Grumble.Playing = true
local Tween60 = game:GetService("TweenService"):Create(A200["A-200"], TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), {["Position"] = script.Parent.Parent.Position})
Tween60:Play()
wait(Tween60.TweenInfo.Time)
Tween60 = game:GetService("TweenService"):Create(A200["A-200"], TweenInfo.new(2, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0), {["Position"] = MeClone.Door.Position})
Tween60:Play()
wait(Tween60.TweenInfo.Time)
workspace["A-200Imprint"]:Play()
wait(2.5)
for i, face in pairs(A200["A-200"].Art:GetChildren()) do
if face:IsA("ImageLabel") and face.Visible == true then
local Decal = Instance.new("Decal")
Decal.Face = "Front"
Decal.Texture = face.Image
Decal.Parent = MeClone.Door
Decal.Transparency = 0.75
Decal.Color3 = Color3.fromRGB(0, 0, 0)
end
end
Tween60 = game:GetService("TweenService"):Create(A200["A-200"], TweenInfo.new(10, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0), {["Position"] = workspace.Start.Exit.Position})
Tween60:Play()
wait(Tween60.TweenInfo.Time)
A200:Destroy()
game.Lighting.Filmic.Enabled = false
end