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)

3 comments
FE is not on, but im going to turn it on. pparent is the parent of the part that touched the block. It's a normal script and the script is inside the ghost,
You did that wrong, it shouold be local pparent = player.Parent