#what is wrong here??

1 messages · Page 1 of 1 (latest)

queen perch
#

tried making a script that spins and changes speed according to playbackloudness and it made the rig spin instead

drifting wind
#

its getting the parent's parent then looking for motor

#

just get the parent then find motor

#

@queen perch

queen perch
#

ok ima try

drifting wind
#

let me know if it works bro

queen perch
#

didnt work

#

its not doing anything now

#

@drifting wind

drifting wind
#

show the script now please

queen perch
#

one sec

drifting wind
#

wait are you even sure you can spin motor6D's?

queen perch
#

task.wait(0.1)
local motor = script.Parent:WaitForChild("Motor")
local song = script.Parent.Parent:WaitForChild("Sound")

repeat task.wait() until song.IsLoaded

local ts = game:GetService("TweenService")

while true do
local loudness = song.PlaybackLoudness
local speed = loudness / 2000
local newC0 = motor.C0 * CFrame.fromEulerAnglesXYZ(speed/12, speed, speed/32)
task.wait()

ts:Create(motor, TweenInfo.new(0.1, Enum.EasingStyle.Linear), {C0 = newC0}):Play()
task.wait()

end

queen perch
#

it worked before

drifting wind
#

oh

#

hmm maybe ask ai or smth whats wrong i have no idea tbh

queen perch
#

hmm

#

i think its smth obvious

drifting wind
#

it gave me this "task.wait(0.1)
local motor = script.Parent:WaitForChild("Motor")
local song = script.Parent.Parent:WaitForChild("Sound")

repeat task.wait() until song.IsLoaded

while true do
if song.IsPlaying then
local loudness = song.PlaybackLoudness
local speed = loudness / 2000
motor.C0 = motor.C0 * CFrame.fromEulerAnglesXYZ(speed / 12, speed, speed / 32)
end
task.wait(0.1)
end
"

#

but honestly it prob dont work 😭

queen perch
#

i dont think its gon work

#

yea

#

lol

drifting wind
#

maybe ill make a baseplate and try help

queen perch
#

didnt work

#

i really think its a hierarchy problem

queen perch
#

ik ik ik ik ik ik ik

low galeBOT
#

studio** You are now Level 2! **studio

cobalt root
#

So the script isn't getting the roots motor?

queen perch
#

idk lol

#

it just does nothing

cobalt root
#

any errors

queen perch
#

nothing in the output too

#

wait

#

ima check again

cobalt root
#

Well

#

You aren't playing the sound

queen perch
#

it is

#

i hear it

cobalt root
#

It's playing already?

queen perch
#

yeah

#

i showed the explorer too

cobalt root
#

did you want the rig to spin or something else?

queen perch
#

no

#

something else

#

a part

cobalt root
#

Because changing the motor6d spins the rig 😭

queen perch
#

what

#

but it worked before???

cobalt root
#

The motor6d is like the controller of the rig

queen perch
#

noo

#

i created a motor6d

cobalt root
#

Ah I see

#

I don't really see an issue with this code 😭

#

print at the bottom inside the loop

queen perch
#

i really think its a explorer thing

#

hmm

cobalt root
#

Nah prob not

#

You don't need :WaitForChild on the server unless you know something will NOT exist btw

#

Print the motor and the sound, and in the output it will be clickable

#

Click on it and see if it redirects you to the correct instance

queen perch
#

isnt waitforchild to wait until something is loaded?

cobalt root
#

Ok

#

Found the issue I think

queen perch
#

you did???

cobalt root
#

If your rig is anchored your rig won't change from the motor

queen perch
#

nothing is anchored

#

ima try in a baseplate

cobalt root
#

Create a new rig

#

And put everything it needs in there

queen perch
#

ok

cobalt root
#

See if that works

queen perch
#

didnt work

#

AaaadsADSdaS

#

IT WAS BECAUSE IT WAS NAHCORED

#

ANCHORED

#

the part was anchored

#

lol

#

@cobalt root

cobalt root
#

Is it better now?

#

@queen perch

queen perch
#

yeah

low galeBOT
#

studio** You are now Level 3! **studio

queen perch
#

it works