Im making a pet wich is made from a mesh added into a part. I used a model (and i modified it) wich is a Script for a pet, i edited some things (like the material, color and transparency). When i play it, it fails
Is there a failure in this Script?
local plr = game.Players.LocalPlayer
wait(2)
local part = Instance.new('Part', workspace[plr.Name].UpperTorso)
part.BrickColor = ("Deep Blue")
part.Material = ("SmoothPlastic")
part.Transparency = (0.1)
part.CanCollide = false
part.Anchored = true
part.Size = Vector3.new(4.327, 3.284, 4.327)
local mesh = game.ReplicatedStorage.SlimePet -- Change UnicornPet to the name of your mesh in ReplicatedStorage
mesh:Clone().Parent = part
local direction = CFrame.new(part.Position, plr.Character['RightLowerArm'].Position).lookVector
local increment = direction * 4
while true do
wait()
part.CFrame = game.Workspace[plr.Name]['UpperTorso'].CFrame + (direction * increment) + Vector3.new(0.2,0.2,0.2)
part.Rotation = game.Workspace[plr.Name]['UpperTorso'].Rotation + (direction * increment) + Vector3.new(0.2, 0.2,increment)
end
