I am having a problem that when I click on the shopkeeper, the GUI pops up but the mouse is stuck in first person. I know I'm supposed to use "modal = true" but I can't figure out what to put before the ".modal" The roblox wiki said use GuiButton.modal = true but it gives me an error when I type that.
game.Workspace["Gun Shop Owner"].ClickDetector.MouseClick:Connect(function()
script.Parent.Frame.Visible = true
GuiButton.Modal = true
end)
here's the very short script. I'm trying to set the value to true when the Gui is pulled up and then I'll set it to false once it is closed. I can't do much until I figure this out even though it doesn't seem like it should be that hard. I'm just a bit confused about it. Can anyone fix this? thanks!

1 comment
try to replace "GuiButton" with "script.Parent.Frame"