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

Don't know what I am doing, just practice, need grounds to continue, what's my next step?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

No output, and I am pretty sure that is because I am missing a huge part of what would make this work anyways, so please teach me how to fill the the blank. Supposed to make a brick that appears in front of your torso and flies towards your mouse position relative to what item it is located on. Tools and these types of functions are foreign to me, so I'd rather everybody give me any advice they can than the problem actually be solved.

local tool = script.Parent
oh = script.Parent.Parent.Parent.Character.Torso.CFrame

tool.Equipped:connect(function(mouse)
mouse.KeyDown:connect(function(key)
    local blhl = Instance.new("Part", workspace)
    blhl.Name = "blhl"
    blhl.CFrame = (oh)
        blhl.Shape = 0
        blhl.BrickColor = BrickColor.new(1003)
        blhl.CanCollide = false
    local bp = Instance.new("BodyPosition", blhl)
        bp.Position = Vector3.new(mouse.Hit.x,mouse.Hit.y,mouse.Hit.z)
end)
    end)
1
Just a note, KeyDown is deprecated. Also, have more of an explanation Shawnyg 4330 — 8y

Answer this question