#emote audio wont stop

273 messages · Page 1 of 1 (latest)

civic ether
#

so i have this emote for my game here and whenever i try to use a script for the audio when i unequip the tool it still plays and doesnt turn off

devout flare
#

show script

gloomy monolith
civic ether
#

theres two sepereate scripts

#

seperate

#

local tool = script.Parent

local function Unequip()
-- Find the sound with the name "vjhlcj"
local sound = tool:FindFirstChild("vjhlvj")

-- If the sound exists, stop it
if sound then
    sound:Stop()
end

end

tool.Unequipped:Connect(Unequip)

#

local tool = script.Parent
local soundId = "rbxassetid://27808972"
local sound = Instance.new("Sound", tool)
sound.SoundId = soundId
sound.Looped = true

local isPlaying = false

tool.Activated:Connect(function()
if isPlaying then
sound:Stop()
else
sound:Play()
end
isPlaying = not isPlaying
end)

gloomy monolith
#

thy are there two different scripts

#

just put them in 1 single script

civic ether
#

idk how

gloomy monolith
#
local tool = script.Parent
local soundId = "rbxassetid://27808972"
local sound = Instance.new("Sound", tool)
sound.SoundId = soundId
sound.Looped = true
local isPlaying = false

tool.Activated:Connect(function()
    if isPlaying then
        sound:Stop()
    else
        sound:Play()
    end
    isPlaying = not isPlaying
end) 

local function Unequip()
 sound:Stop()
end

tool.Unequipped:Connect(Unequip)
civic ether
#

is that the whole script

gloomy monolith
#

yea

civic ether
#

y

#

also

#

ty*

#

also

#

how do you put it in a like

#

grey square

gloomy monolith
#

uh

#

what

civic ether
gloomy monolith
#

oh that

#

right

civic ether
#

yesh

#

oh alr

#

ty

gloomy monolith
#

three ` then a "lua" and then three more at end

civic ether
#

i have one more question rq

gloomy monolith
#
print("Hi")
gloomy monolith
civic ether
#

is the asistant reliable

gloomy monolith
#

no

civic ether
#

assistant

gloomy monolith
#

no ai is reliable

civic ether
#

i cant even script

#

this is a pain

gloomy monolith
#

you can use chatgpt for basic scripts but for complex or intermediate scripts its dog shit

civic ether
#

oh yeah

#

i dont use complex scripts

#

also

#

when i reopen the emote

#

the music doesnt start

gloomy monolith
#

huh

#

wait

gloomy monolith
civic ether
#

let me just show you

#

nvm i cant

#

my emote makes it so

#

you have to click down to start the music

#

and the emote

#

so when you close it

#

they both go off

#

but when you reopen it and click it doesnt do anything

#

only the sound doesnt play

#

emote does

gloomy monolith
civic ether
#

?

civic ether
#

idk

gloomy monolith
#

for the playing of the sound

#

?

civic ether
#

yeah

#

local sound

gloomy monolith
#

in the emote?

civic ether
#

the emote is

#

uh

#

wait what

#

where is the emote script

#

im so confused

#

local tool = script.Parent
local animation = tool:WaitForChild("Animation")

tool.Activated:Connect(function()
local humanoid = tool.Parent:FindFirstChildWhichIsA("Humanoid")
if humanoid then
local anim = humanoid:LoadAnimation(animation)
anim:Play()
tool.Unequipped:Wait()
anim:Stop()
end
end)

gloomy monolith
#
local tool = script.Parent
local soundId = "rbxassetid://27808972"
local sound = Instance.new("Sound", tool)
sound.SoundId = soundId
sound.Looped = true

local function Activated()
    if sound.IsPlaying then
        sound:Stop()
    else
        sound:Play()
    end
end) 

local function Unequip()
 sound:Stop()
end

tool.Unequipped:Connect(Unequip)
tool.Activated:Connect(Activated)
civic ether
#

yeah thats the sound script

gloomy monolith
#

the parent is this same right?

civic ether
#

idk

#

it all in the same tool so yes?

gloomy monolith
#

both of the scripts are stored in the same tool right?

civic ether
#

the script it parented inside of the anim

gloomy monolith
#

hey uh

#

so the thing us uhm

#

you're a dumbass

#

;)

#

anyway so to fix this uh

civic ether
#

dumbass < noob

gloomy monolith
#
local tool = script.Parent
local soundId = "rbxassetid://27808972"
local sound = Instance.new("Sound", tool)
sound.SoundId = soundId
sound.Looped = true

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharaterAdded:Wait()
local Humanoid = Character and Character:FindFirstChildOfClass("Humanoid")
local Animator = Humanoid and Humanoid:FindFirstChildOfClass("Animator")
local Animation = Animator:LoadAnimation(script.parent.Animation)

local function Activated()
    Animation:Play()
    if sound.IsPlaying then
        sound:Stop()
    else
        sound:Play()
    end
end) 

local function Unequip()
 Animation:Stop()
 sound:Stop()
end

tool.Unequipped:Connect(Unequip)
tool.Activated:Connect(Activated)
#

delete the animation script and replace the sound script with this

civic ether
#

toolsound toggle?

kindred dewBOT
#

studio** You are now Level 5! **studio

gloomy monolith
gloomy monolith
civic ether
#

welp

#

now the sound just doesnt play

gloomy monolith
#

does it show any error or smthn

#

wtf

civic ether
#

no it works

#

well it doesnt

#

i mean like

#

the sccript is fine

#

no errors

#

lmao

#

i think its this

gloomy monolith
#

oh

#

right

#
local tool = script.Parent
local soundId = "rbxassetid://27808972"
local sound = Instance.new("Sound", tool)
sound.SoundId = soundId
sound.Looped = true

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharaterAdded:Wait()
local Humanoid = Character and Character:FindFirstChildOfClass("Humanoid")
local Animator = Humanoid and Humanoid:FindFirstChildOfClass("Animator")
local Animation = Animator:LoadAnimation(script.parent.Animation)

local function Activated()
    Animation:Play()
    if sound.IsPlaying then
        sound:Stop()
    else
        sound:Play()
    end
end

local function Unequip()
 Animation:Stop()
 sound:Stop()
end

tool.Unequipped:Connect(Unequip)
tool.Activated:Connect(Activated)
civic ether
#

yeah no

gloomy monolith
#

that should fix it

civic ether
#

its not that

#

it still didnt work

#

alr ill try that

#

still nothing

gloomy monolith
#

ok so

civic ether
#

im a dumbass?

gloomy monolith
#

but im a even bigger one

#

no errors but the sound wont play?

#

wtf

civic ether
#

idk

#

sound is is correct

#

i checked

gloomy monolith
#

OH

#

WAIT

#

I MISSPELLED CHARACTER

#

💀

#

and I made the parent in lower case

#

I did it on discord if it was on studio it wouldnt have been a problem

#

;-;

#
local tool = script.Parent
local soundId = "rbxassetid://27808972"
local sound = Instance.new("Sound", tool)
sound.SoundId = soundId
sound.Looped = true

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character and Character:FindFirstChildOfClass("Humanoid")
local Animator = Humanoid and Humanoid:FindFirstChildOfClass("Animator")
local Animation = Animator:LoadAnimation(script.Parent.Animation)

local function Activated()
    Animation:Play()
    if sound.IsPlaying then
        sound:Stop()
    else
        sound:Play()
    end
end

local function Unequip()
    Animation:Stop()
    sound:Stop()
end

tool.Unequipped:Connect(Unequip)
tool.Activated:Connect(Activated)
civic ether
#

oh

#

.

#

i bet it wont work still

#

cus of my luck

#

WOWWW

#

it doesnt work

#

@gloomy monolith

#

im calling david soon

#

ong

gloomy monolith
#

Idk man I have to sleep I'll send tomorrow when I'm on pc and I can use studio

civic ether
#

u dont have to send it at all but thanks for helping

gloomy monolith
#

ok I won't send

#

Bue

#

Bye

civic ether
#

@devout flare

#

do you have ANY idea what is going on

devout flare
gloomy monolith
civic ether
#

Idk it's 5 30 am and I'm on my phone

gloomy monolith
#

the script is in the tool right

civic ether
#

I think it was in the screen guidd

#

Oh

#

Yeag

#

The tool

gloomy monolith
civic ether
#

Nah haven't slept

#

I wake up at 4 pm 😭🙏

#

Sleep at 8 am

gloomy monolith
#

atleast you're getting the 8 horu sleep unlike me ;P

civic ether
#

Fr

#

One time I slept at 3pm and woke up at 11 am

#

My sleep schedule is horrible

#

But yeah the script is in the tool

gloomy monolith
#

you slept for 20 hours?

#

💀

civic ether
#

Hibernation

#

Ong

gloomy monolith
#

what were you doing? evolving into a butterfly?

#

crazy shit

gloomy monolith
civic ether
#

No

gloomy monolith
#

Oh I think I undnerstand now

civic ether
#

I turned handle off

#

Cus when I used a handle it would anchor the player in a random place and stick there arm out

gloomy monolith
civic ether
#

Yes

#

Currently

gloomy monolith
#

hmmmmm then its weird

#

I dont think the script is wrong

civic ether
#

It's just my luck

gloomy monolith
#

perhaps the animation is R6 and your avatar is R15?

civic ether
#

My avatar is set to r6 and so it the games forced

#

The anim works fine

#

It's just the music

gloomy monolith
#

oh

#

wait

civic ether
#

And I'm grounded also

#

Soo

gloomy monolith
#

the sound works fine buddy

civic ether
#

ıʇ poǝsuʇ

#

It doesn't*

gloomy monolith
#

yes it does

civic ether
#

When you close the tool

#

And open it again

#

Also

gloomy monolith
#

oh

#

wait

civic ether
#

I just rmembered

gloomy monolith
#

yes it does

civic ether
#

The music doesn't play st all

#

Give me the script

gloomy monolith
#

its working just fine

gloomy monolith
civic ether
#

Mine doesn't work

gloomy monolith
#

the problem is probably with your studio

#

the studio has this sound glitch sometimes

#

try to publish the game

#

and play in roblo

#

x

civic ether
#

I did

#

Cus I needed to delt a gui I added on sccident

gloomy monolith
#

is ur volume full?

civic ether
#

Yes my sound is on lol

#

Cus I can hear walking sounds

gloomy monolith
#

ill show a video it works for me

civic ether
#

Alr

#

🫃

gloomy monolith
#

uploading kinda slowly

#

a 31MB video for like 30 seconds

civic ether
#

40 KB/s upload speed lmao

gloomy monolith
#

;/

civic ether
#

I get

gloomy monolith
#

so im using mobile data

civic ether
#

Why does shart and piss not tag

#

On roblox

gloomy monolith
#

piss is like poop there is nothing bad with it

#

whats wrong with piss?

#

poop doesnt tag either

civic ether
#

Why does sh** tag

#

I don't see a difference

gloomy monolith
#

shit does tag

#

cuz uh shit is considered a profanity

civic ether
#

But start isnt

gloomy monolith
#

a low level profanity

civic ether
#

Shart

gloomy monolith
#

and probably cuz stuff like shit head too

gloomy monolith
#

;-

civic ether
#

I don't see a difference between shit and shart

#

Like

gloomy monolith
#

I sharted all over the wall and licked it all away

#

whats wrong with that

#

I dont see anything wrong with the sentence

civic ether
#

It sound worse 😭

civic ether
gloomy monolith
#

whats wrong with that

civic ether
#

YES

gloomy monolith
#

ok it uploaded

#

finally

civic ether
#

It uploaded

civic ether
kindred dewBOT
#

studio** You are now Level 6! **studio

civic ether
#

Cus when u add an emote it messes it up I think

gloomy monolith
#

works fine

civic ether
#

@gloomy monolith

#

Can you create a model?

civic ether
#

@gloomy monolith

#

is it alr if u just make a model

gloomy monolith
#

wdym

civic ether
#

nvm

#

i learned some scripting in half an hour

#

and made the script work