So basically I'm trying to make it so if I click on a block with a hammer it checks if the player that's clicking is the owner of the block here's what I have:
local tool = script.Parent
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local function onActivate()
local clickLocation = mouse.Hit
if clickLocation.values.ownervalue.Value == 'DrGigaByte' then
clickLocation:Destroy()
end
end
tool.Activated:connect(onActivate)
I'm getting an error saying " values is not a valid member of CFrame" is there any way I could access the hit part and destroy it?

5 comments
mouse.Target not mouse.Hit
idk what you are trying to do but I would use mouse.Target
That worked, thank you0.
yeh mouse.Hit is a cframe value lol
yeh mouse.Hit is a cframe value lol