So i already made a script to make a selection box hover over an item and when the mouse doesn't hover over the item, the selection box gets destroyed....
now my goal is to, when the mouse.Pointer hovers over the item and when the player clicks the right clicks the item, a Gui should appear directly above it.. Here is what I have so far..
while wait() do -- for ever loop
local a = game:GetService("Players").LocalPlayer:GetMouse() -- players mouse
if a.Target == "Hitbox" then -- if the players mouse hovers over hitbox then
local b = script.Parent.Parent.ChangeItem -- a variable is created in place of a gui...
a.MouseButton2Down:connect(function() -- when the player clicks that spot, "HitBox" then
print("O_o") -- it should print that face
b.Enabled = true -- it should make the gui enabled
b.Frame.Position = UDim2.new(0,a.X,0,a.Y) -- the frame of the gui should be directly on the mouse
end)
end
end
Script ^ in StarterGui
thanks for any help, variables are in the code, tell what they are...

1 comment
hmm i will try this bellyrium.. looks quite right to me