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: Image Rotation help

Previous Thread :: Next Thread 
MezornoIV is not online. MezornoIV
Joined: 20 Jul 2010
Total Posts: 2276
25 May 2015 02:36 PM
Here's what I have

while true do
game.StarterGui.ScreenGui.Frame.ImageLabel.Rotation = 60
wait(.1)
game.StarterGui.ScreenGui.Frame.ImageLabel.Rotation = 120
wait(.1)
game.StarterGui.ScreenGui.Frame.ImageLabel.Rotation = 180
wait(.1)
game.StarterGui.ScreenGui.Frame.ImageLabel.Rotation = 240
wait(.1)
game.StarterGui.ScreenGui.Frame.ImageLabel.Rotation = 300
wait(.1)
game.StarterGui.ScreenGui.Frame.ImageLabel.Rotation = 360
wait(.1)
end

But it won't spin, It will shift to the right to Rotation = 60, then stop. Help?
Report Abuse
MezornoIV is not online. MezornoIV
Joined: 20 Jul 2010
Total Posts: 2276
25 May 2015 02:41 PM
Bump.
Report Abuse
Oxazepam is not online. Oxazepam
Joined: 16 Jun 2012
Total Posts: 471
25 May 2015 02:42 PM
From my past experience, you keep it at one number, and that's the speed it rotates at
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
25 May 2015 02:44 PM
Hmmm, kind of inefficient. Use game.Players.LocalPlayer.PlayerGui instead of StarterGui, too.
Report Abuse
MezornoIV is not online. MezornoIV
Joined: 20 Jul 2010
Total Posts: 2276
25 May 2015 02:44 PM
Nope, It still sticks at that one point.
Report Abuse
ZeroHour66 is not online. ZeroHour66
Joined: 14 Sep 2013
Total Posts: 1511
25 May 2015 02:45 PM
Try this

while true do()
game.StarterGui.ScreenGui.Frame.ImageLabel.Rotation = game.StarterGui.ScreenGui.Frame.ImageLabel.Rotation + 60
wait(.1)
end
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
25 May 2015 02:45 PM
Show me your new script.
Report Abuse
MezornoIV is not online. MezornoIV
Joined: 20 Jul 2010
Total Posts: 2276
25 May 2015 02:48 PM
@Klink

I did what you suggested and added it into the player on added.


game.Players.PlayerAdded:connect(function(p)
game.Workspace.ScreenGui:clone().Parent = p.PlayerGui
p.PlayerGui.ScreenGui.Frame.ImageLabel.Rotation = 60
wait(.1)
p.PlayerGui.ScreenGui.Frame.ImageLabel.Rotation = 120
wait(.1)
p.PlayerGui.ScreenGui.Frame.ImageLabel.Rotation = 180
wait(.1)
p.PlayerGui.ScreenGui.Frame.ImageLabel.Rotation = 240
wait(.1)
p.PlayerGui.ScreenGui.Frame.ImageLabel.Rotation = 300
wait(.1)
p.PlayerGui.ScreenGui.Frame.ImageLabel.Rotation = 360
wait(.1)
end)

This works now. Thanks
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
25 May 2015 02:49 PM
Please don't use a while loop, use a for loop! You'll find it to be more efficient and smoother!



-𝒩 | Anticodist, Scripter
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
25 May 2015 02:49 PM
Um, that is really inefficient. Are you sure you don't want to change it?
Report Abuse
MezornoIV is not online. MezornoIV
Joined: 20 Jul 2010
Total Posts: 2276
25 May 2015 02:50 PM
I was just testing, I wasn't using it for a game. But now I know how to use it properly I can use it. But care to explain what you mean @Klink?
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
25 May 2015 02:52 PM
Ok, first of all, do you only want it to rotate when the player first joins the game or not?
Report Abuse
MezornoIV is not online. MezornoIV
Joined: 20 Jul 2010
Total Posts: 2276
25 May 2015 02:53 PM
I am making an intro, I am having the "BloxDev" logo spin for a second or two and then disappearing.
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
25 May 2015 02:55 PM
I would suggest this instead of what you were doing to rotate your image:
while true do
image.Rotation = image.Rotation+60
wait (.1)
end
Report Abuse
MezornoIV is not online. MezornoIV
Joined: 20 Jul 2010
Total Posts: 2276
25 May 2015 03:03 PM
@Klink what you gave me broke it.



game.Players.PlayerAdded:connect(function(p)
game.Workspace.ScreenGui:clone().Parent = p.PlayerGui
local image = p.PlayerGui.ScreenGui.Frame.ImageLabel


while image.Rotation >= 1440 do
image.Rotation = image.Rotation + 60
wait (.1)
end
end)

I'm back where I started, It didn't move.
Report Abuse
ZeroHour66 is not online. ZeroHour66
Joined: 14 Sep 2013
Total Posts: 1511
25 May 2015 03:03 PM
@klink

Oh good I was somewhere close to right on
Report Abuse
ZeroHour66 is not online. ZeroHour66
Joined: 14 Sep 2013
Total Posts: 1511
25 May 2015 03:04 PM
@mezo
you changed image to equal game.startergui.ScreenGui.Frame.Imagelabel right?
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
25 May 2015 03:05 PM
Ok try this:

game.Players.PlayerAdded:connect(function(p)
game.Workspace.ScreenGui:clone().Parent = p.PlayerGui
local image = p.PlayerGui:WaitForChild("ScreenGui").Frame.ImageLabel


while image.Rotation >= 1440 do --Um... Do you need this?
image.Rotation = image.Rotation + 60
wait (.1)
end
end)
Report Abuse
MezornoIV is not online. MezornoIV
Joined: 20 Jul 2010
Total Posts: 2276
25 May 2015 03:07 PM
@Klink,
I need the 1440 thing so that it will stop spinning after 4 spins. I don't want it to go on forever.
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
25 May 2015 03:08 PM
Ok, I would add a wait instead because I think that's the part that is breaking it. Just make it wait the amount of time it takes to spin four times.
Report Abuse
MezornoIV is not online. MezornoIV
Joined: 20 Jul 2010
Total Posts: 2276
25 May 2015 03:10 PM
Okay. Thanks for your help.
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