Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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)

4 comments

0

Read my bio.

0

idk what you mean, i did. anyways, i fixed the issue by changing the CFrame.new(x y z) in line14

0

hahahaha hiimgoodpack. I still see you say that every once in a while. Hahahahaha!

0

YES HE DIDNT INDENT

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.