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 ;(