Mouse.Target Can't find model

  1. What am I making? I’m making a Paint Script (not finished) , If you click on a model, It’ll change it’s color this is Serverside

  2. What do you want to achieve? Mouse.Target Finding the model inside Workspace

  3. What is the issue? It keeps printing “Model Unknown” even though my mouse is pointing at the model

  4. What solutions have you tried so far? I haven’t seen anyone have a error like this, so no solutions so far

Serverside script:

script.Parent.ColorModel.OnServerEvent:Connect(function(Player, Target)
	local ColorVal = script.Parent.FindColor
	local Mouse = Target.Parent
	local Model = Mouse:FindFirstChild("ModelFurniture")
	
	if Mouse:FindFirstChild("ModelFurniture") and Model.ClassName == "Model" then
		print("Model Found")
	else
		print("Model Unknown")
	end
end)

Clientside script:

local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()

Mouse.Button1Down:Connect(function()
	script.Parent.ColorModel:FireServer(Mouse.Target)
end)

you cant find a model with mouse.Hit, you would need to get the mouse.Hit.Instance and check if the parent is the model