#Tool Power

27 messages · Page 1 of 1 (latest)

rose plinth
#

I'm trying to make it so that when you click, the model in ReplicatedStorage appears (Cero) in front of the player like a magic attack. How will I do that? This script is inside a tool in StarterPack.

rocky temple
rose plinth
#

yes, I found out a way to do that but the model doesn't appear in front of me when I click. It appears where it was before I put it into ReplicatedStorage.

rocky temple
rose plinth
#

This is the new script

#
local player = game.Players.LocalPlayer
local replicatedStorage = game:GetService("ReplicatedStorage")
local model = replicatedStorage.Cero
local spawnDelay = 0.75

tool.Activated:Connect(function()
    wait(spawnDelay)

    local character = player.Character
    if character then
        local modelClone = model:Clone()
        modelClone.Parent = workspace
        modelClone:SetPrimaryPartCFrame(character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -5))
    end
end)```
rocky temple
#

Can you put it between the ```

#

Easier to read

rose plinth
#

hold on

#

there

rocky temple
#

Better thx

rose plinth
#

yw

rocky temple
rose plinth
#

no there isn't any

#

wait no

#

there is

rocky temple
#

Ok

rose plinth
#

it says Model:SetPrimaryPartCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this.

rocky temple
#

You could try to use cframe instead?

#

Try to position the model to the humanoidrootpart *5

#

I don't think models has cframe?

#

do they

rose plinth
#

i dont think so

rocky temple
#

Maybe try use position

rose plinth
#

ok

rocky temple
#

Set the position of the model to what you want