Nikkulai
|
  |
| Joined: 01 Jun 2014 |
| Total Posts: 946 |
|
|
| 27 Feb 2017 07:47 PM |
i am making a script and i have this: yy = Instance.new("BodyVelocity") yy.maxForce = Vector3.new(math.huge, math.huge, math.huge) yy.velocity = Player.Character.Torso.CFrame.lookVector*100 yy.Parent = xx But how would i make it go where the mouse is pointing? Please help. Thanks!
game: https://www.roblox.com/games/605940670/Bloxtrops-Adventure-WIP-V-0-1 |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2017 07:50 PM |
| 1. Use better names for ur variables xx = brick yy = bv for example 2. Use mouse hit cframe local player = game.Players.LocalPlayer local mouse = player:GetMouse() local pos = mouse.Hit.p --Hit is a CFrame, # ## the position of that cframe local direction = (pos - xx.Position).unit yy.Velocity = direction * 10 |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2017 07:55 PM |
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local pos = mouse.Hit.p local direction = (pos - xx.Position).unit yy.Velocity = direction * 10
Cleared it from roblox filtering. |
|
|
| Report Abuse |
|
|
Nikkulai
|
  |
| Joined: 01 Jun 2014 |
| Total Posts: 946 |
|
|
| 27 Feb 2017 08:53 PM |
Alright, Thanks Bro
game: https://www.roblox.com/games/605940670/Bloxtrops-Adventure-WIP-V-0-1 |
|
|
| Report Abuse |
|
|
ZyroKai
|
  |
| Joined: 26 Nov 2015 |
| Total Posts: 136 |
|
|
| 27 Feb 2017 09:20 PM |
| I have a problem i have a character customization gui that changes shirts pants packages and faces, and it works in studio but not in game pls help |
|
|
| Report Abuse |
|
|
Nikkulai
|
  |
| Joined: 01 Jun 2014 |
| Total Posts: 946 |
|
|
| 27 Feb 2017 09:57 PM |
If the scripts are Normal scripts but use LocalPlayer then it wont work in game. Only localscripts work with that.
game: https://www.roblox.com/games/605940670/Bloxtrops-Adventure-WIP-V-0-1 |
|
|
| Report Abuse |
|
|