generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Need help with script

Previous Thread :: Next Thread 
Sir_Scoot is online. Sir_Scoot
Joined: 07 Oct 2009
Total Posts: 4
27 Nov 2017 04:12 PM
I'm attempting to make a grappling hook which works in studio, but not in game. I've tried converting it into a local script, but the entire script just fails. Nothing shows up in the output. Is there a way to make this script compatible with a local script? There's something I'm doing wrong, but I'm not sure what it is.

Here is my script:

local Mouse = game.Players.LocalPlayer:GetMouse()

Rename = 90

o = script.Parent

wait (.5)

local Body = Instance.new("BodyPosition",game.Players.LocalPlayer.Character.Torso)

Body.D = 1250
Body.MaxForce = Vector3.new(500000,500000,500000)
Body.P = 10000

Body.Position = o.Position

script.Parent.Name = Rename

Rename = Rename + 1


Mouse.KeyDown:connect(function(key)
if key:byte() == 32 then --spacebar is 32
print("Space bar has been pressed")
Body:remove()
end
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image