So i was planning to make a info frame for when a player is hovering my button and i did make this
local thing=Instance.new('TextLabel')
local ss=Instance.new('ScreenGui')
local contain=Instance.new('Frame')
contain.Size=UDim2.fromOffset(500,80)
ss.Parent=game:GetService'Players'.LocalPlayer:WaitForChild'PlayerGui'
thing.Size=UDim2.fromOffset(150,50)
thing.AnchorPoint=Vector2.new(.5,.5)
contain.InputBegan:Connect(function(input)
thing.Visible=true
thing.Position=UDim2.fromOffset(input.Position.X+120,input.Position.Y)
thing.Text=tostring(input.UserInputType):sub(rawlen('Enum.UserInputType.')+1,rawlen(tostring(input.UserInputType)))
end)
contain.InputChanged:Connect(function(input)
thing.Position=UDim2.fromOffset(input.Position.X+120,input.Position.Y)
thing.Text=tostring(input.UserInputType):sub(rawlen('Enum.UserInputType.')+1,rawlen(tostring(input.UserInputType)))
end)
contain.InputEnded:Connect(function(input)
thing.Visible=false
end)
thing.Parent=contain
contain.Parent=ss
thing.BackgroundColor3=Color3.fromRGB(47,47,47)
thing.Text='Waiting For An Input'
thing.TextColor3=Color3.fromRGB(0,121)
But i want to know if there is a better way to do this ?