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

Why Is My Soccer Goalkeeper Not Moving?

Asked by
jacobwow 140
9 years ago

I made a soccer goalkeeper that teleports behind the ball when it goes inside of a certain area to block the shot. However, it does not work. Here is the script:

local Save1 = game.Lighting.Save1
local Ready = game.Lighting.Ready
local gameBall = game.Workspace.gameBall.Handle

function Save()
if Ready == game.Workspace then
Ready.Parent = game.Lighting
local SaveNum = math.random(1,1)
if SaveNum == 1 then
Save1.CFrame = CFrame.new(gameBall.Position + Vector3.new(3,0,0))
end
end

if gameBall.Position.Vector3(x) < -267 then
if gameBall.Position.Vector3(x) > -300 then
if gameBall.Position.Vector3(z) > 150 then
if gameBall.Position.Vector3(z) < 210 then
if gameBall.Position.Vector3(y) < 70 then
Save()
wait(2)
Save1.Parent = game.Lighting.Save1
Ready.Parent = game.Workspace

Note: there may be multiple things wrong, also, there are no error messages.

Answer this question