Alright, so In this script I'm getting the error "Unexpected Symbol near '?' " It doesn't tell me where it is. I'm doing this script where i equip a tool a gui pops up and when I unequip it, it disappears. Any help would be appreciated! Thank you for your time.
Script:
Tool = script.Parent
function onEquippedLocal()
local character = script.Parent.Parent
local player = game.Players:GetPlayerFromCharacter(character)
if player==nil then return end
guiMain = script.Parent.ScreenGui:clone()
guiMain.Parent = player.PlayerGui
end
function onUneqippedLocal()
guiMain:Remove()
end
Tool.Equipped:connect(onEquippedLocal)
Tool.Unequipped:connect(onUnequippedLocal)

8 comments
code block please
Sorry about that, I just added it in the post.
It didn't give you the line on which the error occurred but you're sure it's this script? My first guess is that it's your guiMain variable. You should at least declare it outside of your onEquippedLocal function.
I just did that but unfortunately it did not work. :(
Apperantly i can't poste pictures in here?? Anyway, if you are sure the script error is in this script, (you can check it by seeing red "~~" under your text) then there should appear a black "Go to script error" button. Please click on that, and give us the error. Then we can help you more. If you want a picture how to do these steps, add me on discord: Mikeyboy#8760 where i will send a guide.
You don't need to clone and remove the gui you want to appear and disappear, you can use the boolean property, Enabled, instead.
I can write a very basic script as an example if you would like.
From the code you have given us, I don't see anything wrong with it. You sure this is all of it? Also, if you are getting an error then it will tell you exactly where and what line the error is on