So im preparing for halloween with a brand new game. And i was scripting ghosts but, they don't give me a jumpscare, here's the code!
-- plrcheck.PlayerGui = gui function scared(player) local player.Parent = pparent local plrcheck = game.Players:GetPlayerFromCharacter(pparent) if plrcheck then local screenGui = Instance.new("ScreenGui", plrcheck.Playergui) local imageLabel = Instance.new("ImageLabel") imageLabel.Parent = screenGui imageLabel.Position = UDim2.new(0, 25, 0, 50) imageLabel.Size = UDim2.new(1, 0, 1, 0) imageLabel.Image = "rbxassetid://133049047" end end script.Parent.Touched:connect(scared)
Try changing local player.Parent = pparent
tolocal pparent = player.Parent