I'm trying to find the parent of the mouse.Target but I can't find a way to do it
local players = game:GetService("Players") local player = players.LocalPlayer local mouse = player:GetMouse() local mTar = mouse.Target mouse.Button1Down:Connect(function() print("hi1") if mTar.Name == "Hitbox" and player.UserId == mTar.Parent.Parent.PlantOwner.Value then print("hello") end end)
Any help would be appreciated!
Never mind... found the solution. My variables were messing it up. I had to write mouse.Target instead