ok! so, im making a roblox game that is like five night at freddy's but with a twist,…
- User
ok! so, im making a roblox game that is like five night at freddy's but with a twist, currently, im making a hidding system in my game, but i am having trouble to do that, can you help me figure it out? here is the code that runs in every locker in the game:
local LockerModule = {}
LockerModule.HideAndExit = function(plr: Player, locker:Model, PlayerHidding: Player) local door: Model = locker.Door
local InsideCam: Part = locker.InsideCam local InsidePos: Part = locker.InsidePos local OutsidePos: Part = locker.OutsidePos local Interactable: ProximityPrompt = locker.Interactable.ProximityPrompt local Hide_Exit_Event: RemoteEvent = locker["Hide/Exit"] local plrChar = plr.Character local plrHrp = plrChar:FindFirstChild("HumanoidRootPart") local plrHum = plrChar.Humanoid if locker:GetAttribute("Avaliable") == true then plrChar:SetAttribute("Hidding", true) locker:SetAttribute("Avaliable", false) Interactable.Enabled = false elseif plrChar:GetAttribute("Hidding") == true then if plr ~= PlayerHidding then return error("Player that is requesting to exit isnt the same as the player hidding, Please review the local code or players localScript", 1) end plrChar:SetAttribute("Hidding", false) locker:SetAttribute("Avaliable", true) Interactable.Enabled = true end
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.