I have made a simple crafting system, but there is one problem. When I hit the keybind, it opens the GUI for all the players online. I have searched everywhere for this slight bug but nothing comes up. Here's the current code I have.
game:GetService("UserInputService").InputBegan:connect(function(g, y)
if g.KeyCode == Enum.KeyCode.E then
if not script.Parent.Parent:IsA("StarterGui") then
script.Parent.ScrollingFrame.Visible = not script.Parent.ScrollingFrame.Visible
end
end
end)
Does anyone have ideas?
Thanks in advance, Iplaydev

2 comments
https://scriptinghelpers.org/blog/common-mistakes#PlayerGui
That did not help.