#How to show the gui

1 messages · Page 1 of 1 (latest)

snow hollow
#

local frame = script.Parent
local multiplier = frame:WaitForChild("Multiplier")
local number = frame:WaitForChild("Number")
local description = frame:WaitForChild("Description")
local mouse = game.Players.LocalPlayer:GetMouse()

local enter = false
local offset = Vector2.new(10, 10)
description.Visible = false

multiplier.Active = true
multiplier.Selectable = true

multiplier.MouseEnter:Connect(function()
print("Mouse entered")
enter = true
description.Visible = true
end)

multiplier.MouseLeave:Connect(function()
print("Mouse left")
enter = false
description.Visible = false
end)

mouse.Move:Connect(function()
if enter then
description.Position = UDim2.new(0, mouse.X + offset.X, 0, mouse.Y + offset.Y)
end
end)

torpid kernel
#

Hey

#

could you explain the issue you're having?

#

@snow hollow

snow hollow
#

for some reason it wont show

torpid kernel
#

when you hover the "multiplier"?

snow hollow
#

i want the description beside the mouse

#

but it wont work

torpid kernel
#

are you sure "description" exists?

snow hollow
#

yeah it exist

torpid kernel
#

can you put this line

pearl mangoBOT
#

studio** You are now Level 15! **studio

torpid kernel
#

below "local description" ?

#
print(description and "description exists" or "description doesnt exist")
snow hollow
torpid kernel
#
local frame = script.Parent
local multiplier = frame:WaitForChild("Multiplier")
local number = frame:WaitForChild("Number")
local description = frame:WaitForChild("Description")
local mouse = game.Players.LocalPlayer:GetMouse()

local enter = false
local offset = Vector2.new(10, 10)
description.Visible = false

multiplier.Active = true
multiplier.Selectable = true

multiplier.MouseEnter:Connect(function()
    print("Mouse entered")
    enter = true
end)

multiplier.MouseLeave:Connect(function()
    print("Mouse left")
    enter = false
end)

mouse.Move:Connect(function()
    description.Position = UDim2.new(0, mouse.X + offset.X, 0, mouse.Y + offset.Y)
    description.Visible = enter
end)
#

can you replace this

#

with your code?

snow hollow
#

didnt work

torpid kernel
#

put this line:

print(description.Visible and "description visible" or "description not visible")

below

description.Visible = enter
snow hollow
#

the hell

#

it says its visible

#

but it wont show

torpid kernel
#
description.Position = UDim2.new(0, mouse.X+10, 0, mouse.Y)
#

try replacing

snow hollow
#

didnt work

torpid kernel
#

i dunno then

#

its the position probably

snow hollow
#

it wont just show

#

i gave up

#

imma just make it visible

torpid kernel
#

put this line:

print(description.Position)

below

description.Visible = enter
#

try this

snow hollow
#

02:39:25.088 description visible - Client - LocalScript:28
02:39:25.106 Mouse left - Client - LocalScript:20
02:39:25.107 {0, 77}, {0, 635} - Client - LocalScript:27

#

it wont just show

#

i dont know why

old glacier
snow hollow
old glacier
#

ok wait

#

i will check

#

try this:

local player = game.Players.LocalPlayer
local mouse = player and player:GetMouse()
if not mouse then return end

local frame = script.Parent
local multiplier = frame:WaitForChild("Multiplier")
local number = frame:WaitForChild("Number")
local description = frame:WaitForChild("Description")

local enter = false
local offset = Vector2.new(10, 10)
description.Visible = false

multiplier.Active = true
multiplier.Selectable = true

multiplier.MouseEnter:Connect(function()
enter = true
description.Visible = true
end)

multiplier.MouseLeave:Connect(function()
enter = false
description.Visible = false
end)

mouse.Move:Connect(function()
if enter then
local newX = mouse.X + offset.X
local newY = mouse.Y + offset.Y
local screenSize = workspace.CurrentCamera.ViewportSize
local descSize = description.AbsoluteSize

    if newX + descSize.X > screenSize.X then
        newX = screenSize.X - descSize.X
    end
    if newY + descSize.Y > screenSize.Y then
        newY = screenSize.Y - descSize.Y
    end

    description.Position = UDim2.new(0, newX, 0, newY)
end

end)

snow hollow
#

ok

#

didnt work

old glacier
#

ok

old glacier
#

pls

snow hollow
crimson remnant
#

bro might be editing startergui not playergui

snow hollow
#

should it be playergui?

crimson remnant
#
local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

local frame = playerGui:WaitForChild("YourScreenGui"):WaitForChild("YourFrame") 
local multiplier = frame:WaitForChild("Multiplier")
local number = frame:WaitForChild("Number")
local description = frame:WaitForChild("Description")
local mouse = player:GetMouse()

local offset = Vector2.new(10, 10)
description.Visible = false

multiplier.Active = true
multiplier.Selectable = true

multiplier.MouseEnter:Connect(function()
    print("Mouse entered")
    description.Visible = true
end)

multiplier.MouseLeave:Connect(function()
    print("Mouse left")
    description.Visible = false
end)

mouse.Move:Connect(function()
    if description.Visible then
        description.Position = UDim2.new(0, mouse.X + offset.X, 0, mouse.Y + offset.Y)
    end
end)
#

try this

#

you have to change the variables to your gui though

#

since idk where its located

#

oh wait

#

you posted an image of it

snow hollow
#

i give up

#

it wont work

crimson remnant
#

wait i just realised your using script.parent anyway

#

what are you actually trying to achieve

#

from this script

snow hollow
#

wait imma send vid

#

like this

#

when i hover the description will show

old glacier
#

i can't help you sorry