Im trying to make a game where a sandwich is running arounding eating people(Karma in a nutshell) However my script isn't working, can you help me out?
script.Parent.Touched:connect(function(hit)
if hit.Parent then
local humanoid = hit.Parent:findFirstChild("Humanoid")
if humanoid then
local char = hit.Parent
if char then
char.Torso.CFrame = script.Parent.tounge.Position
char.Torso.Anchored = true
if char.CFrame == script.Parent.tounge.Position then
local sammich = script.Parent
if sammich then
sammich.topbread:MoveTo(18.3, 16.7, 7.2)
sammich.Head:MoveTo(25.584, 20.562, 6.465)
wait(.5)
sammich.topbread:MoveTo(18.3, 15.5, 7.2)
sammich.Head:MoveTo(25.584, 19.362, 6.465)
wait(.5)
sammich.topbread:MoveTo(18.7, 13.7, 7.2)
sammich.Head:MoveTo(25.584, 18.762, 6.465)
end
end
end
end
end
end)

1 comment
Well I just wanted its Top part to close, and I want the Position of the player to be in its mouth, and also local sammich = script.Parent is the sandwich bread which the script is in.