rennec
|
  |
| Joined: 02 Jul 2014 |
| Total Posts: 28 |
|
|
| 11 Jan 2015 12:42 PM |
local player = script.Parent.Parent.Parent.Parent.Parent
function onClick(mouse) while true do w1 = Instance.new("Weld") w1.Parent = player.Character.Chest.anim w1.Part0 = w1.Parent w1.Part1 = player.Character.Torso w1.C0.CFrame = w1.C0.Cframe * CFrame.fromEulerAnglesXYZ(0,1,0) wait() end end
script.Parent.MouseButton1Down:connect(onClick)
..So I wrote this script for a morph I'm making. I'm trying to make the aura, which is called "anim" in the morph rotate. I put while true do in and used welds to rotate the part so only the part rotates, not the torso along with it because it's attached to the torso, but it doesn't repeatably rotate, it only rotates a tiny bit and never does it again. Any clue why? thanks.
|
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Jan 2015 12:47 PM |
| try putting in 0.1 in the wait() like this wait(0.1) |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2015 02:15 PM |
local player = script.Parent.Parent.Parent.Parent.Parent
function onClick(mouse) while true do w1 = Instance.new("Weld") w1.Parent = player.Character.Chest.anim w1.Part0 = w1.Parent w1.Part1 = player.Character.Torso while wait() do w1.C0.CFrame = w1.C0.Cframe * CFrame.fromEulerAnglesXYZ(0,1,0) end end end
script.Parent.MouseButton1Down:connect(onClick)
|
|
|
| Report Abuse |
|
|
Hibobb
|
  |
| Joined: 18 Apr 2010 |
| Total Posts: 2146 |
|
|
| 11 Jan 2015 02:19 PM |
Your script would continually add welds to the anim part. You most likely want only one. The other welds interfere with each other and thats why it stops. I would do(make sure anim is anchored):
script.Parent.MouseButton1Down:connect(function() while wait() do player.Character.Chest.anim.CFrame = player.Character.Chest.anim.CFrame * CFrame.Angles(0,math.rad(1),0) end end)
Hey, check this place out! http://www.roblox.com/Maze-Escape-Deep-Alpha-place?id=194858740 |
|
|
| Report Abuse |
|
|