Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What am I doing wrong in this script?

Asked by 10 years ago

I'm trying to clone a car and put it into the position coordinates. What am I doing wrong.

function OnTouch(hit)
            if game.Players:GetPlayerFromCharacter(hit.Parent)then
            Clone = game.Workspace["Nissan 240SX(Car)"]:Clone()
            Clone.Parent = game.Workspace
            Clone:MoveTo(Vector3.new(-26, 4.2, -878))
            end
            end
            end
            end
        end
        end
    end
end

script.Parent.Touched.connect(OnTouch)

Answer this question