It should be disabled so that when the part is touched the Gui is enabled.
local Players = game:GetService("Players")
local Part = script.Parent
Part.Touched:Connect(function(Hit)
local HitModel = Hit:FindFirstAncestorOfClass("Model")
if HitModel then
local HitPlayer = Players:GetPlayerFromCharacter(HitModel)
if HitPlayer then
HitPlayer.PlayerGui.Winter.Enabled = true
end
end
end)
Should the Gui be enabled from the start? If so, use the following script to disable it when the part is touched. The previous script I provided was attempting to enable it (which would do nothing as it was already enabled).
local Players = game:GetService("Players")
local Part = script.Parent
Part.Touched:Connect(function(Hit)
local HitModel = Hit:FindFirstAncestorOfClass("Model")
if HitModel then
local HitPlayer = Players:GetPlayerFromCharacter(HitModel)
if HitPlayer then
HitPlayer.PlayerGui.Winter.Enabled = false
end
end
end)
Refer to my earlier post, you need to disable the “Enabled” property before you launch the game, so that when the part is touched this property can be enabled and the Gui can be shown.