|
| 02 Oct 2016 08:04 PM |
Because I'm a lazy noob, could someone make a script for a gui that shakes it (rotates frequently back and forth), when you hover over it, and reset back to the original position when you stop hovering
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:08 PM |
wiki.roblox.com
is your friend |
|
|
| Report Abuse |
|
|
| |
|
XCVlll
|
  |
| Joined: 23 Oct 2008 |
| Total Posts: 963 |
|
|
| 02 Oct 2016 08:09 PM |
| this isn't what this forum is meant for |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:10 PM |
i know. i didnt ask what it was for
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:19 PM |
| Look up TweenRotation on wiki.roblox.com |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:21 PM |
wiki.roblox.com
is your best friend [2]
t(-.-t) |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:21 PM |
It not that I don't know how to rotate, the issue is to keep it rotating back and forth while you're hovering, then having it reset to the original position when the mouse leaves.
The only real problem i have is to keep it going until your mouse leaves.
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:22 PM |
So again, your wiki responses are useless, as it's not a syntax error, it's a logic error.
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:23 PM |
use while true do and a wait
t(-.-t) |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:24 PM |
or when the mouse hovers over it then use a function to tween it
t(-.-t) |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:26 PM |
Ill paste my script, one second.
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:29 PM |
| Do you know how to even script a function? If not why are you jumping straight to gui movement?? |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:30 PM |
I'm not inept, I told you, it's a logic issue, not a syntax issue. I'll paste the script.
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:32 PM |
function AssaultHover() while true do for i = 1,5,1 do wait() script.Parent.Interface.ClassButtons.Assault.Rotation = script.Parent.Interface.ClassButtons.Assault.Rotation + 2 end end end
Assault.MouseEnter:connect(AssaultHover)
Obviously this only goes one direction, and doesn't ever stop even if you hover off of it, because i didn't script it to do that yet.
I just need to know, once it reaches a certain rotation value, it stops, and does the same thing the opposite direction, then resets back to the original position when stop hovering. I'd image i'd make a seperate function, but again, it's a logic issue.
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 08:33 PM |
The main issue is making it stop, then resetting.
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 09:15 PM |
.MouseEnter
blnHovering = true
.MouseLeave
blnHovering = false
while blnHovering do wait() --Shaking code here end |
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 09:19 PM |
Thanks, but i almost got it right. This is it so far.
--Variables AssaultHoverValue = false Assault = script.Parent.Interface.ClassButtons.Assault.Button
function AssaultHover() wait() if AssaultHoverValue == true then while AssaultHoverValue == true do wait() script.Parent.Interface.ClassButtons.Assault.Rotation = script.Parent.Interface.ClassButtons.Assault.Rotation + 1 wait() script.Parent.Interface.ClassButtons.Assault.Rotation = 0 wait() script.Parent.Interface.ClassButtons.Assault.Rotation = script.Parent.Interface.ClassButtons.Assault.Rotation - 1 end end end
function TurnHoverOn() AssaultHoverValue = true end
function TurnHoverOff() AssaultHoverValue = false end
Assault.MouseEnter:connect(AssaultHover) Assault.MouseEnter:connect(TurnHoverOn) Assault.MouseLeave:connect(TurnHoverOff)
Sure it's painfully inefficient, but it almost works perfectly, just needs some tweaking
|
|
|
| Report Abuse |
|
|
|
| 02 Oct 2016 09:20 PM |
That's the first semi-working draft, anyways..
|
|
|
| Report Abuse |
|
|
|
| 03 Oct 2016 10:21 PM |
| ################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################### |
|
|
| Report Abuse |
|
|