I got this error code while helping a friend make a scare maze:
13:47:20.777 - The Parent property of Scare is locked, current parent: NULL, new parent PlayerGui
Heres my code:
local gui = script.Parent.Scare
local scream = script.Parent.Scream
local debounce = false
script.Parent.Touched:connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if not plr.PlayerGui:FindFirstChild("Scare") then
gui:Clone()
gui.Parent = plr.PlayerGui
scream:Play()
wait(4)
scream:Stop()
gui:Destroy()
end
end)

1 comment
try hit.Parent.Parent. Sometimes using hit can get buggy...