Gui doesnt appear on touch

so basically im making a part that will make a gui appear when on touch
but when character touches it, it doesnt appear

script:
local Players = game:GetService("Players")

script.Parent.Touched:connect(function(part)
	-- make sure the part still exists
	if not part.Parent then return end

	-- make sure it's a humanoid
	local h = part.Parent:FindFirstChild("Humanoid")
	local player = Players:GetPlayerFromCharacter(part.Parent)
	print(player)
	if not h then return end
	

	player:WaitForChild("PlayerGui").Subtitles.Speaking.Text = "AAAAAAAAAAAAAAAAAAA" -- IGNORE --
	player:WaitForChild("PlayerGui").Subtitles.Namer.Text = "You:" -- IGNORE --
	player:WaitForChild("PlayerGui").deathlol.dstart.BackgroundTransparency = 0
   wait(0.1)

	player:WaitForChild("PlayerGui").Subtitles.Speaking.Text = " " -- IGNORE --
	player:WaitForChild("PlayerGui").Subtitles.Namer.Text = " " -- IGNORE --
	script.Parent:Destroy()
end)

help ;(

Are there any errors? Can you show a picture of your Workspace? Is the GUI enabled or disabled?

nevermind i forgot to change the place of background sorry lol

If the issue is resolved, please mark the most appropriate solution.

1 Like

yeah just did, flagged my post so the mods delete it too

1 Like