Permission = {"andrewboy159","PLAYER","PLAYER"} RunText = "/computer run obby2" StopText = "/computer stop obby2" Map = "Obby2" game.Players.ChildAdded:connect(function(Player) Player.Chatted:connect(function(Chat) for i = 1, #Permission do if Player.Name == Permission[i] then if string.lower(Chat) == RunText then if not game.Workspace:FindFirstChild(Map) then game.ServerStorage[Map]:Clone().Parent = game.Workspace end elseif string.lower(Chat) == StopText then if game.Workspace:FindFirstChild(Map) then game.Workspace[Map]:Remove() end end end end end) end)
Heres my old MESSY code for Slender House minigames.
I used to use this script for Slender House its old and a bit messy code but fine for beginner's.
while true do script.Parent.L1.SoundId = "rbxassetid://159564304" script.Parent.L1:Play() wait(10) --local player = game.Players:GetPlayers() local player = game:GetService("Players"):GetPlayers() print("Got Players") for i = 1, #player do print("Have Players") game.Lighting.Minigame1:clone().Parent = game.Workspace wait(15) print("Teleporting Players To Map") player[i].Character:MoveTo(Vector3.new(2742.16, 919.19, -433.668)) script.Parent.L1:Pause() script.Parent.M1:Play() script.Parent.L1.SoundId = "rbxassetid://144652376" wait(60) game.Workspace.Minigame1:Remove() player[i].Character:MoveTo(Vector3.new(2058.5, 808.665, -467.594)) script.Parent.M1:Pause() script.Parent.L1.SoundId = "rbxassetid://165854869" script.Parent.L1:Play() wait(20)--Lobby time game.Lighting.Minigame2:clone().Parent = game.Workspace wait(15) player[i].Character:MoveTo(Vector3.new(236.128, 79.66, -167.719)) script.Parent.L1:Pause() script.Parent.M2:Play() wait(60) game.Workspace.Minigame2:Remove() player[i].Character:MoveTo(Vector3.new(2058.5, 808.665, -467.594)) script.Parent.M2:Pause() script.Parent.L1.SoundId = "rbxassetid://166349101" script.Parent.L1:Play() wait(20)--Lobby time game.Lighting.Minigame3:clone().Parent = game.Workspace wait(20) player[i].Character:MoveTo(Vector3.new(2818.731, 863.74, -348.36)) script.Parent.L1:Pause() script.Parent.M3:Play() wait(60) game.Workspace.Minigame3:Remove() player[i].Character:MoveTo(Vector3.new(2058.5, 808.665, -467.594)) script.Parent.M3:Pause() script.Parent.L1.SoundId = "rbxassetid://160652910" script.Parent.L1:Play() wait(30)--Lobby time game.Lighting.Minigame4:clone().Parent = game.Workspace wait(15) player[i].Character:MoveTo(Vector3.new(2890.738, 918.795, -556.728)) script.Parent.L1:Pause() script.Parent.M4:Play() wait(60) game.Workspace.Minigame4:Remove() player[i].Character:MoveTo(Vector3.new(2058.5, 808.665, -467.594)) script.Parent.M4:Pause() script.Parent.L1.SoundId = "rbxassetid://131395268" script.Parent.L1:Play() wait(20)--Lobby time game.Lighting.Minigame5:clone().Parent = game.Workspace wait(15) player[i].Character:MoveTo(Vector3.new(341.17, 110.829, -528.191)) script.Parent.L1:Pause() script.Parent.M5:Play() wait(60) game.Workspace.Minigame5:Remove() player[i].Character:MoveTo(Vector3.new(2058.5, 808.665, -467.594)) script.Parent.M5:Pause() script.Parent.L1.SoundId = "rbxassetid://145262991" script.Parent.L1:Play() wait(20)--Lobby time game.Lighting.Minigame6:clone().Parent = game.Workspace wait(15) player[i].Character:MoveTo(Vector3.new(516.016, 123.344, -536.515)) script.Parent.L1:Pause() script.Parent.M6:Play() wait(60) game.Workspace.Minigame6:Remove() player[i].Character:MoveTo(Vector3.new(2058.5, 808.665, -467.594)) script.Parent.M6:Pause() script.Parent.L1.SoundId = "rbxassetid://142278786" script.Parent.L1:Play() wait(20)--Lobby time script.Parent.M7.Volume = 1 game.Lighting.Minigame7:clone().Parent = game.Workspace wait(15) player[i].Character:MoveTo(Vector3.new(2857.187, 919.461, -529.281)) script.Parent.L1:Pause() script.Parent.M7:Play() wait(60) game.Workspace.Minigame7:Remove() player[i].Character:MoveTo(Vector3.new(2058.5, 808.665, -467.594)) script.Parent.M7:Pause() end end`
OR
replace game.Lighting.Minigame1:Clone().Parent = game.Workspace WITH game:GetService("Lighting").Minigame1:Clone().Parent=game.Workspace
Done.