About a year ago I created a horror game called 'lights' in which you were trapped inside a haunted factory that forced to to collect keys which corresponded to certain doors that would help you get out. (Rust Key open rusty door etc.)
The problem is that I believe Roblox changes a lot of their scripting and building scenes for game development leaving my place broken and unusable.
Which changes can I look for? I saw a warning to change "Game" to "game" and "Wait" to "wait". But what else? For example, this still does not work, and it used to.
local Item = script:WaitForChild("Rusty Key") local Sound = game.Lighting:WaitForChild("Pickup") local Debounce = false
script.Parent.Touched:connect(function(hit) if not hit or not hit.Parent or Debounce then return end local Player = game.Players:GetPlayerFromCharacter(hit.Parent) if not Player or not Player:FindFirstChild("Inventory") or Player.Inventory:FindFirstChild(Item.Name) then return end Debounce = true ypcall(function() Item:Clone().Parent = Player.Inventory local Clone = Sound:Clone() Clone.Parent = Player.PlayerGui wait(0.1) Clone:Play() end) wait(0.1) Debounce = false end)