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

Help With In-Script Values?

Asked by
Scootakip 299 Moderation Voter
8 years ago
function Follow()
    for i,v in pairs(game.Players:GetChildren()) do
        if v.Name == script.Parent.Owner.Value then
            local ohner = v.Character
        end
    end
    script.Parent.Zombie:MoveTo(ohner.Torso.LookVector - 10)
end

This script is supposed to keep the zombie following its owner about 10 studs behind it. It labels its owner's player through the local in-script value of Ohner, but then for some reason it can't call back to it in line 7... Help?

Answer this question