So.. I'm making this game where you collect berries. There's a script that I've requested help with before on this website, that I recently updated to be compatible with new changes to the game, but just like last time, my output's being bombarded by error messages even though the script works as intended. However, having my output basically unreadable is definitely not wanted. Anyways, the script is supposed to activate a billboardGUI (dex) whenever a player hovers their mouse over a "berry", I've added this part that is the parent of "berry" that if hovered over, will disable the same GUI as previously enabled. But when I look at the bush (berry.Parent.Parent) that the berry is in, this error message pops up in the output: Berry is not a valid member of UnionOperation. (The bush is a union) Anyhow, here's the script, hope someone can help xD:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Move:Connect (function()
if mouse.Target then
local target = mouse.Target
if target and target.Parent then
if target:FindFirstChild ("dex") then
target.dex.Enabled = true
if target.Transparency == 1 then
target.dex.Enabled = false
end
elseif target:FindFirstChild ("DexOff") then
target:FindFirstChild ("DexOff").Parent.Berry.dex.Enabled = false
end
end
end
end)
