So i was creating a pet script and i was finishing and i tested it , all went well , but the textures didn't load what am i doing wrong?, also i called the function correctly
function getpet(player)
model = Instance.new("Model")
model.Parent = game:service("Workspace")
model.Name = "SUCC"
model.Parent = player.Character
part_1 = Instance.new("Part")
part_1.Shape = "Ball"
part_1.BrickColor = BrickColor.new("Medium stone grey")
part_1.Name = "Succ"
part_1.Orientation = Vector3.new(0, 0, 0)
part_1.CFrame = CFrame.new(-68.7600021, 6.59172153, 54.5149994, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part_1.RotVelocity = Vector3.new(0, 0, 0)
part_1.Velocity = Vector3.new(0, 0, 0)
part_1.Anchored = false
part_1.Size = Vector3.new(5.4299984, 5.4299984, 5.4299984)
part_1.BottomSurface = Enum.SurfaceType.Smooth
part_1.TopSurface = Enum.SurfaceType.Smooth
part_2 = Instance.new("Part")
part_2.BrickColor = BrickColor.new("Medium stone grey")
part_2.Name = "Part"
part_2.Orientation = Vector3.new(0, 0, 0)
part_2.CFrame = CFrame.new(-69.0481415, 9.18636131, 54.807888, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part_2.RotVelocity = Vector3.new(0, 0, 0)
part_2.Velocity = Vector3.new(0, 0, 0)
part_2.Anchored = true
part_2.Size = Vector3.new(4, 1, 2)
part_2.BottomSurface = Enum.SurfaceType.Smooth
part_2.TopSurface = Enum.SurfaceType.Smooth
part_1.Parent = model
part_2.Parent = part_1
local BillboardGui = Instance.new("BillboardGui")
local TextLabel = Instance.new("TextLabel")
--Properties:
BillboardGui.Parent = part_2
BillboardGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
BillboardGui.Adornee = part_2
BillboardGui.AlwaysOnTop = true
BillboardGui.LightInfluence = 1
BillboardGui.Size = UDim2.new(0, 161, 0, 40)
BillboardGui.StudsOffset = Vector3.new(0, 2, 0)
TextLabel.Parent = BillboardGui
TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
TextLabel.BackgroundTransparency = 1
TextLabel.ClipsDescendants = true
TextLabel.Size = UDim2.new(0, 161, 0, 40)
TextLabel.Font = Enum.Font.Fantasy
TextLabel.Text = "SUCC"
TextLabel.TextColor3 = Color3.new(0, 0, 0)
TextLabel.TextSize = 20
TextLabel.TextWrapped = true
local function makeTexture(id,face,par)
local text = Instance.new("Texture")
text.Texture = "rbxassetid://"..id
text.Face = face
text.Parent = part_1
end
makeTexture(1289589869,"Bottom")
makeTexture(1289589869,"Left")
makeTexture(1289589869,"Right")
makeTexture(1289589869,"Back")
makeTexture(1289589869,"Front")
makeTexture(1289589869,"Top")
game:GetService("RunService").Stepped:Connect(function()
part_1.CFrame = player.Character.Torso.CFrame * CFrame.new(2,0,2)
end)
local petsound = coroutine.create(function()
while wait(20) do
local succsound = Instance.new("Sound",game.Chat)
succsound.SoundId = "rbxassetid://437928192"
succsound.Volume = 6
succsound:Play()
succsound.Ended:Connect(function()
succsound:Destroy()
end)
end
end)
coroutine.resume(petsound)
end