im kinda new to scripting soooo
local debounce = false
script.Parent.Touched:Connect(function(hit)
if not debounce then
debounce = true
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.PlayerGui.loa.Enabled = true
end
end)
script.Parent.TouchEnded:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.PlayerGui.loa.Enabled = false
end)

1 comment
You are referencing the model with touched events not the player themselves. What exactly are you trying to accomplish with this script? LocalScripts are used under the gui itself to help clean code up and know where your writing to.