#Dropper Script, using models

1 messages · Page 1 of 1 (latest)

torn salmon
#

So i have this dropper script but i want to move and scale my model, how do i fix this?

local RandomPet = require(game.ServerScriptService.RandomPet)

local Dropper = script.Parent.Dropper
local DropWait = 1

local Egg = "BasicEgg"

local function dropItem()
    local chosenPetName = RandomPet.GetRandomPet(Egg)    
    
    if not chosenPetName then
        warn("No pet chosen!")
        return
    end

    local petModel = game.ReplicatedStorage.Pets:FindFirstChild(Egg):FindFirstChild(chosenPetName)
    if not petModel then
        warn("Pet model not found:", chosenPetName)
        return
    end

    local newItem = petModel:Clone()
    newItem.Parent = game.Workspace
    newItem.CFrame = Dropper.CFrame * CFrame.new(0,-2, 0)
end

while true do
    wait(DropWait)
    dropItem()
end```

11:01:21.388 CFrame is not a valid member of Model "Workspace.Black Cat" - Server - DropperScript:24```

#

i also want to scale the model to a set size and not sure how

unborn gazelle
#

models have to use MoveTo() or PivotTo() instead of directly changing their cframe

#

moveto takes a vector3 value and moves the model to the highest y level of that new position

#

pivotto takes a cframe value

#

its basicaly the same as moveto but doesnt put a model on the highest y value, so ig u can refer to it as a more precise method

#

and to scale the model to a set size, im pretty sure models should have a scale property or smth similar to that

torn salmon
unborn gazelle
#

tweenservice doesnt work on models

#

maybe u could weld all of the parts to one part and then tween that one part but idrk if thats an efficient idea or would even work

#

u should try searching up how to tween models

torn salmon
#

well im using a mesh

#

ill have a look then for animation of a part

unborn gazelle
#

alr gl

torn salmon