My Level 25 only door won't work because of a problem. The problem is W001: Unknown global 'hit' Script:
local required_level = 25
local db = true script.Parent.Touched:Connect(function() if hit.Parent:FindFirstChild("Humanoid") then -- this line is the one that has the problem W001: Unknown global 'hit' local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player.leaderstats.Level.Value >= required_level then if db then db = false script.Parent.Transparency = 0.5 script.Parent.CanCollide = false wait(3) script.Parent.CanCollide = true script.Parent.Transparency = 0 db = true end else player.Character.Humanoid.Health = 0 end end end)

3 comments
Please use a Lua Text Box, When you edit the post,where it has the Lua icon, click that then put all of your code for that one script inside of those to bars that show up. Start to finish, you can have multiple boxes as well.
Please use a Lua Text Box, When you edit the post,where it has the Lua icon, click that then put all of your code for that one script inside of those to bars that show up. Start to finish, you can have multiple boxes as well.
Please use a Lua Text Box, When you edit the post,where it has the Lua icon, click that then put all of your code for that one script inside of those to bars that show up. Start to finish, you can have multiple boxes as well.