Hello All,
I’m attempting to use mouse.Target to have the name of an object pop up when a mouse hovers over the object. Each object has a stingValue named “Mineral”. This works fine if the object is a BasePart. It doesn’t work when the object is a Model. Is there a similar function to get the same effect when hovering over a Model? I’ve searched a bit, but so far in vain. The example script is below:
UIS.InputChanged:Connect(function(input)
if mouse.Target then
if mouse.Target:FindFirstChild("Mineral") then
player.PlayerGui.BillboardGui.Enabled = true
player.PlayerGui.BillboardGui.Adornee = mouse.Target
player.PlayerGui.BillboardGui.TextLabel.Text = mouse.Target.Name
else
player.PlayerGui.BillboardGui.Enabled = false
player.PlayerGui.BillboardGui.Adornee = nil
player.PlayerGui.BillboardGui.TextLabel.Text = ""
end
end
end)