local player = game.Players.LocalPlayer local mouse = player:GetMouse() while true do if mouse.Target == script.Parent.Parent.Parent then print("Mouse hovering over food") script.Parent.BillboardGui.Enabled = true else script.Parent.BillboardGui.Enabled = false end wait(.1) end
reupload because no one answered me last time properly :(
LocalScripts cannot be run from the Workspace. v
A LocalScript will only run Lua code if it is a descendant of one of the following objects: A Player’s Backpack, such as a child of a Tool A Player’s character model A Player’s PlayerGui A Player’s PlayerScripts. The ReplicatedFirst service
What you should do(insert this LocalScript in "StarterPack"):
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local part = game.Workspace.Food--Change this variable to the food part local billboard = part.BillboardGui --Change this variable to the billboardgui while true do if mouse.Target == part then billboard.Enabled = true print("Mouse hovering over food") else billboard.Enabled = true end wait(.1) end