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

Trying to teleport a zombie, error?

Asked by
OFF_S4LE 127
3 years ago

ServerScriptService.EventScript:11: invalid argument #3 (Vector3 expected, got string)

 while wait(5) do
    local event = math.random(1, 3)
    if event == 1 then
        print(1)
        game.StarterGui.EventGui.Frame.TextLabel.Text = "Wrath Takes Hold."
        local Wrath1 = game.ReplicatedStorage.Folder.Zombie:Clone()
        local Wrath2 = game.ReplicatedStorage.Folder.Zombie:Clone()
        local Wrath3 = game.ReplicatedStorage.Folder.Zombie:Clone()
        local Wrath4 = game.ReplicatedStorage.Folder.Zombie:Clone()
        Wrath1.Parent = workspace
        Wrath1.HumanoidRootPart.Position = "-633.383, -6.904, 189.149"

    else
        if event == 2 then
            print(2)
        else
            if event == 3 then
                print(3)
            end
        end
    end
end

1 answer

Log in to vote
1
Answered by 3 years ago
Edited 3 years ago

Line 11 should be

Wrath1.HumanoidRootPart.Position = Vector3.new(-633.383, -6.904, 189.149)

as the Position argument takes a vector3 instead of a string.

Ad

Answer this question