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

Why does this C-frame function not run if I use this touch event?

Asked by 5 years ago
local Tsunami = script.Parent
local Checkbox1  = game.Workspace.Checkbox1

local StartPosition = Vector3.new(-9.841, -11.092, 387.632)

Tsunami.Touched:Connect(function(hitpart)
    if hitpart == Checkbox1 then 
    for i = 1,200 do
wait(.01)
Tsunami.CFrame = CFrame.new(StartPosition) + Vector3.new(0,15*i,0)
Tsunami.CFrame = Tsunami.CFrame * CFrame.Angles(math.rad (0), (4.71238898038), (0));
    end
    end
end)

Answer this question