ClassName = "LocalScript"
function onTouch(part)
local UI = script.Parent.ScreenGui:Clone()
UI.Parent = game.Players.LocalPlayer
end
script.Parent.Touched:connect(onTouch)
Your mixing up the use of a local script and an actual script.
Use a script make sure to use methods such as to actually get the player.
GetPlayerFromCharacter()
Right now your code is not correct but you have the some-what of the right idea.