Proximity Prompt Problem

hello, so i’m having a problem with proximity prompt. i’m trying to make it so that when it is triggered, dialogue happens and guis tween onto the screen. for some unknown reason, it’s not working. not even the output says anything is wrong. is there something wrong here?

local deb = false

game.Workspace.TalktoWorker1.ProximityPrompt.Triggered:Connect(function(player)
	if player.Parent:findFirstChild("Humanoid") and deb == false then
		deb = true
		for i,v in pairs(game.Players:GetPlayers()) do
			local PlayerGui = v.PlayerGui
			wait(3)
    -- like 70 lines of code that i'm not going to put here because it's unnecessary
		end
		deb = false
		end
	end) 

any help will be super appreciated. thank you!

I think it’s because you are trying to find the Humanoid within the player objects parent, player.Parent:findFirstChild(“Humanoid”). Try replacing that with player.Character:FindFirstChild(“Humanoid”).

1 Like

you’re a genius. thank you so much.

1 Like