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
 

Re: Could someone help me with a REALLY basic script?

Previous Thread :: Next Thread 
iButterflies is not online. iButterflies
Joined: 12 Sep 2011
Total Posts: 2524
10 Jan 2015 05:26 PM
Hi, I have a c-frame spin inserted into a tool that I'm using to make a gear(tool) rotate, but when the tool is equipped it makes your character fly around the map spinning(due to the rotate script), could someone show me what I need to add to this script to make it not spin when it is picked up/equipped? here is the script:



spinning = script.Parent

while true do
spinning.CFrame = spinning.CFrame * CFrame.fromEulerAnglesXYZ(0, math.rad(3), 0)
wait(0.05)
end
Report Abuse
iButterflies is not online. iButterflies
Joined: 12 Sep 2011
Total Posts: 2524
10 Jan 2015 05:38 PM
what do i do
Report Abuse
BotBit is not online. BotBit
Joined: 05 Jan 2015
Total Posts: 163
10 Jan 2015 05:38 PM
is this in the tool?
Report Abuse
iButterflies is not online. iButterflies
Joined: 12 Sep 2011
Total Posts: 2524
10 Jan 2015 05:41 PM
yeah
Report Abuse
BotBit is not online. BotBit
Joined: 05 Jan 2015
Total Posts: 163
10 Jan 2015 05:42 PM
ill try to fix it, uno momento.
Report Abuse
iButterflies is not online. iButterflies
Joined: 12 Sep 2011
Total Posts: 2524
10 Jan 2015 05:45 PM
thanks, it works as it should, when i insert the script into the handle of the tool it makes it spin, but when I pick up the tool I spin along with it, I need an addition to the script that would disable the spin script when a player picks up the tool, i just dont know how to write even simple code
Report Abuse
BotBit is not online. BotBit
Joined: 05 Jan 2015
Total Posts: 163
10 Jan 2015 05:45 PM
make a model pls
Report Abuse
iButterflies is not online. iButterflies
Joined: 12 Sep 2011
Total Posts: 2524
10 Jan 2015 05:46 PM
ok
Report Abuse
iButterflies is not online. iButterflies
Joined: 12 Sep 2011
Total Posts: 2524
10 Jan 2015 06:14 PM
can anyone else help?
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
10 Jan 2015 06:23 PM
is it in the tool, or in a part in the tool?
Report Abuse
BotBit is not online. BotBit
Joined: 05 Jan 2015
Total Posts: 163
10 Jan 2015 06:43 PM
i tried am sry
Report Abuse
verbalAKspray is not online. verbalAKspray
Joined: 09 Jul 2014
Total Posts: 23685
10 Jan 2015 07:27 PM
spinning = script.Parent
local pickedup = false

while not pickedup do
spinning.CFrame = spinning.CFrame * CFrame.fromEulerAnglesXYZ(0, math.rad(3), 0)
wait(0.05)
end

script.Parent.Parent.Equipped:connect(function()
pickedup = true
end)

script.Parent.Unequipped:connect(function()
wait()
pickedup = false
end)

& ayy i'm toastaindisguise/jswag
Report Abuse
LucasLua is not online. LucasLua
Joined: 18 Jun 2008
Total Posts: 7386
10 Jan 2015 07:44 PM
@verbal

Your script would stop working after picking it up - as in, if the player were to drop it again it would not start spinning again.

Furthermore it wouldn't stop spinning when they picked it up because it would only execute the lines that stop the while loop if the while loop has stopped, which it will never do.
Report Abuse
iButterflies is not online. iButterflies
Joined: 12 Sep 2011
Total Posts: 2524
10 Jan 2015 10:05 PM
I tried yours @verbal, it span, but it still did not disable the spinning when it was picked up.

can anybody else help me?
Report Abuse
iButterflies is not online. iButterflies
Joined: 12 Sep 2011
Total Posts: 2524
10 Jan 2015 10:21 PM
halp pls
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