Hello, im trying to make it where if a player is touching a block a gui shows, if there not it doesn’t show but i can only reference the Playergui by Player = Touch.Parent.Name then game.Players:WaitForChild(Player) but how do i get them if there not touching it?
game.Workspace.TouchForWarmth.Touched:Connect(function(Touch)
if Touch:IsA("MeshPart") then
if Touch.Name == "Torso" then
if Touch.Parent:WaitForChild("Humanoid") then
local PlayerName = Touch.Parent.Name
local Player = game.Players:WaitForChild(PlayerName)
local PlayerGui = Player.PlayerGui.Uis
PlayerGui.ColdOrHot.Hot.Visible = true
PlayerGui.ColdOrHot.Cold.Visible = false
else
end
end
end
end)