Im trying to make a spoopy game (idk why) and i wanted to start it by having someone walk into a house and when they enter the doorway it put a text label with some spoopy stuff but it isnt working and output stopped telling me stuff this is the local script portion
local Player = game.Players.LocalPlayer
local PlateEvent = game.ReplicatedStorage.PlateEvent
local YWDH = script.Parent
function YWDHF()
YWDH.Text = "ERROR"
YWDH.Visible = true
wait(0.5)
YWDH.Text = "YOU WILL DIE HERE"..Player.Name
wait(2)
YWDH.Text = "ERROR"
wait(0.5)
YWDH:Destroy()
end
PlateEvent.OnClientEvent:Connect(YWDHF)
and this is the plate script portion
local Plate = script.Parent
local PlateEvent = game.ReplicatedStorage.PlateEvent
Plate.Touched:Connect(function(hit, player)
if hit.Parent == player then
PlateEvent:FireClient()
end
end)
as i said output stopped talking so idk what to do some help would be really appreciated ive had good experiences with you before so now i need help (was unfairly banned from the discord server so had to come here)

2 comments
Also change his local script for him, he doesn't define player in his function. I would do it but I like your answer better lol.
Thanks