Never mind I figured it out with my old script from 2 years ago lol.
local bool = false
local activated = 0
local function close()
local jaw = script.Parent.Jaw:GetChildren()
local teeth = script.Parent.Teeth:GetChildren()
for a,b in pairs (jaw) do
if b:IsA('UnionOperation') or b:IsA('Part') then
b.CFrame = b.CFram
e * CFrame.new(0,-0.1,0)
end
end
for c,d in pairs (teeth) do
if d:IsA('UnionOperation') or d:IsA('Part') then
d.CFrame = d.CFrame * CFrame.new(0,-0.1,0)
end
end
end
local function open()
local jaw = script.Parent.Jaw:GetChildren()
local teeth = script.Parent.Teeth:GetChildren()
for a,b in pairs (jaw) do
if b:IsA('UnionOperation') or b:IsA('Part') then
b.CFrame = b.CFrame * CFrame.new(0,0.1,0)
end
end
for c,d in pairs (teeth) do
if d:IsA('UnionOperation') or d:IsA('Part') then
d.CFrame = d.CFrame * CFrame.new(0,0.1,0)
end
end
end
script.Parent.Activate.ClickDetector.MouseClick:connect(function()
if bool == false then
bool = true
if activated == 0 then
for x = 50,0,-0.1 do
wait()
open()
end
else
for x = 50,0,-0.1 do
wait()
close()
end
end
bool = false
end
end)
2 comments
Stacks beginning and ending are not errors.
Unless you have an answer pls don't reply or answer, ty.