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

I cant figure out why my script is not working?

Asked by 4 years ago
Edited 4 years ago

Sorry, Im really new at scripting it's giving me an error over hunting. I have looked for a while and I'm not sure what's wrong with it. any help would be awesome. Thanks!

01local mypart = Instance.new("Part",workspace)
02local myPos = Vector3.new(0,10,0)
03local myLook = Vector3.new(0,1,0)
04local myCFrame = CFrame.new(myPos,myLook)
05mypart.Anchored = true
06 
07while (1) do
08    mypart.CFrame = myCFrame
09    Pigred72 = workspace:WaitForChild("Pigred72")
10    myLook = Pigred72.HumanoidRootPart.Position
11    myCFrame = CFrame.new(myPos,myLook)
12    wait ()
13end
14 
15local function getClosestAvatarPostion(part)
View all 43 lines...
0
What is the error and which line? Gingerely 245 — 4y
0
Line 27 Hunting Pigred72 0 — 4y
0
it has a Error over The Hunting on Line 27 and I have no idea why Pigred72 0 — 4y
0
Change Hunting = PlayerPostion[1] on line 27 to local Hunting = PlayerPostion[1] rabbi99 714 — 4y

Answer this question