Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My jumpscare dosen't pop up when touching a ghost, why?

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

0
  1. Is FE on? 2) What is pparent? 3) Is this a normal script or a local script? 4) Where is this script located in the explorer?
0

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,

0

You did that wrong, it shouold be local pparent = player.Parent

1 answer

✓ Accepted answer

Try changing local player.Parent = pparent tolocal pparent = player.Parent

3 comments

0

If you put you code in an inline code block (the C button), I'll upvote you.

0

Changed :)

0

Thanks.

This discussion is preserved as it was. New answers, comments, and votes are closed.