local Plank = workspace.Plank
local Numbers = Plank.Folder
local Mouse = Plrs.LocalPlayer:GetMouse()
local Dist = 10
local Mag = (Plank.Position - Dist).Magnitude
Mouse.KeyDown:Connect(function(Key)
if Mag <= Dist then
if Key == "A" then
print("In range!")
end
else
print("Not in range!")
end
end)
I'm trying to make it so that when you click this plank it plays a sound which resembles knocking on wood; it's only supposed to work when the player is within 10 units of the plank though. It seems it does not print "In range!" though. Why?

1 comment
Okay, I'll try that.