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

Function getting called actions, not working. How Do I fix?

Asked by
RM0d 305 Moderation Voter
10 years ago
local Door = script.CarGarrageDoor:Clone()
Door.Parent = workspace.CurrentCamera

local start,End,increese = 1,75,0
local a,b,c,d = Door.Up.A,Door.Up.B,Door.Down.A,Door.Down.B
    for i = start,End,increese do 
    a.CFrame = a.CFrame + Vector3.new(0,0.1,0)
    b.CFrame = b.CFrame + Vector3.new(0,0.1,0)
    c.CFrame = c.CFrame - Vector3.new(0,0.1,0)
    d.CFrame = d.CFrame - Vector3.new(0,0.1,0)
    end

script.Event.Changed:connect (function (value)

print("Hey")

local a,b,c,d = Door.Up.A,Door.Up.B,Door.Down.A,Door.Down.B     
    for i = start,End,increese do 
    a.CFrame = a.CFrame - Vector3.new(0,0.1,0)
    b.CFrame = b.CFrame - Vector3.new(0,0.1,0)
    c.CFrame = c.CFrame + Vector3.new(0,0.1,0)
    d.CFrame = d.CFrame + Vector3.new(0,0.1,0)
    wait()
    end



    for i = start,End,increese do 
    a.CFrame = a.CFrame + Vector3.new(0,0.1,0)
    b.CFrame = b.CFrame + Vector3.new(0,0.1,0)
    c.CFrame = c.CFrame - Vector3.new(0,0.1,0)
    d.CFrame = d.CFrame - Vector3.new(0,0.1,0)
    wait()
    end





end)

it prints Hey but dosent move

1 answer

Log in to vote
0
Answered by
RM0d 305 Moderation Voter
10 years ago

Fixed. Ported the script to camera its self

Ad

Answer this question