Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how i make a tool that can place models?

Asked by 4 years ago
Edited 4 years ago

idk how to make it, i tryed pick so many tools from toolbox and it dont work

0
This site is not a request site. ArtyomAL3X 12 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

You can tweek this around to make your own model.

You can add this to a model with block named as "Handle" and a Touch Transmitter named as "TouchInterest"

local Tool = script.Parent;
debris = game:GetService("Debris")

enabled = true

local sounds = {Tool.Handle.MoneySound1, Tool.Handle.MoneySound2, Tool.Handle.MoneySound3}
local buck = nil


buck = Instance.new("Part")
buck.formFactor = 2
buck.Size = Vector3.new(2,.4,1)
buck.BrickColor = BrickColor.new(28)
buck.TopSurface = 0
buck.BottomSurface = 0
buck.Elasticity = .01 

local d = Instance.new("Decal")
d.Face = 4
d.Texture = "http://www.roblox.com/asset/?id=16658163"
d.Parent = buck

local d2 = d:Clone()
d2.Face = 1
d2.Parent = buck

function isTurbo(character)
    return character:FindFirstChild("Monopoly") ~= nil
end

function MakeABuck(pos)

    local limit = 5
    if (isTurbo(Tool.Parent) == true) then
        limit = 15 -- LOL!
    end

    for i=1,limit do

        local b = buck:Clone()
        local v = Vector3.new(math.random() - .5, math.random() - .5, math.random() - .5).unit
        b.CFrame = CFrame.new(pos + (v * 2) + Vector3.new(0,4,0), v)
        b.Parent = game.Workspace
        debris:AddItem(b, 60)
    end

end

function onActivated()
    if not enabled  then
        return
    end

    enabled = false

    local char = Tool.Parent

    sounds[math.random(3)]:Play()

    MakeABuck(Tool.Handle.Position)

    char.Torso["Right Shoulder"].MaxVelocity = 0.5
    char.Torso["Right Shoulder"].DesiredAngle = 3
    wait(.2)
    char.Torso["Right Shoulder"].MaxVelocity = 0.5
    char.Torso["Right Shoulder"].DesiredAngle = 3
    wait(.2)
    char.Torso["Right Shoulder"].MaxVelocity = 0.5
    char.Torso["Right Shoulder"].DesiredAngle = 3
    wait(.2)
    char.Torso["Right Shoulder"].MaxVelocity = 0.5
    char.Torso["Right Shoulder"].DesiredAngle = 3
    wait(.2)


    char.Torso["Right Shoulder"].MaxVelocity = 1

--[[
    Tool.GripForward = Vector3.new(0,-1,0)
    Tool.GripPos = Vector3.new(0,0,2)
    Tool.GripRight = Vector3.new(1,0,0)
    Tool.GripUp = Vector3.new(0,0,-1)
]]--
    enabled = true

end



script.Parent.Activated:connect(onActivated)


Ad
Log in to vote
0
Answered by 4 years ago

This site is not a request site. You are not supposed to ask how to script, but you need to show what you tried to do.

Answer this question