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

how can i make it so the part spawns next to my right hand instead of above the torso?

Asked by 7 years ago

basically im trying to make a script where if you press Q it spawns a "ki blast" sort of thing if you've seen dbz. but i'm trying to get it to spawn next to the right hand so it's not too tall and it can't hit anything.

Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()
Mouse.KeyDown:connect(function(key)
 key = key:lower()
 if key == "q" then
  local x = Instance.new("Part")
  x.Shape = "Ball" 
  x.Material = "Neon"
  x.BrickColor = BrickColor.new("Toothpaste")
  x.TopSurface = "Smooth"
  x.BottomSurface = "Smooth"
  x.CanCollide = false
  x.Anchored = false
  x.CFrame = Player.Character.Torso.CFrame * CFrame.new(0,3,-5)
  local v = Instance.new("BodyVelocity", x)
  v.velocity = Player.Character.Head.CFrame.lookVector * 60

  v.maxForce = Vector3.new(math.huge, math.huge, math.huge)

  x.Parent = workspace
for i=1, 10 do
    x.Transparency = x.Transparency + 0.1
    wait(0.05)
end

  x:Destroy() 

      end

end)
0
Read my bio. hiimgoodpack 2009 — 7y
0
idk what you mean, i did. anyways, i fixed the issue by changing the CFrame.new(x y z) in line14 AngelGd 0 — 7y
0
hahahaha hiimgoodpack. I still see you say that every once in a while. Hahahahaha! rilgundam 65 — 7y
0
YES HE DIDNT INDENT hiimgoodpack 2009 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

i solved this problem, nvm

Ad

Answer this question