-
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
-
What do you want to achieve? Mouse.Target Finding the model inside Workspace
-
What is the issue? It keeps printing “Model Unknown” even though my mouse is pointing at the model
-
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)