To fix your problem, you need to access the PlayerGui rather than the StarterGui. To get the player, we'll have to get the character from the part that touched it, then go from there. (Also you forgot to connect the function)
script.Parent.Touched:connect(function(Part)
local Player = game.Players:GetPlayerFromCharacter(Part.Parent)
if Player then
local Gui = Player.PlayerGui.TouchedGui.Frame
if Gui.Visible == false then
Gui.Visible = true
print'True'
else
Gui.Visible = false
print'False'
end
end
end)
Ok, now your script should work. If you have any further problems/questions, please leave a comment below, and I'll see what I can do. Hope I helped :P
####-Dyler3