#i made a dmg sound script but it aint workin bruv

177 messages · Page 1 of 1 (latest)

lethal pebble
#

this is in ServerScriptService so yeah

green oyster
#

there is a error right

#

ohp is a number

#

at the bottom where is says ohp = health do humanoid.Health = health

lethal pebble
#

alright

#

still aint working

#

@green oyster

green oyster
#

make it print somthing inside the if

lethal pebble
#

why but alright]

green oyster
#

to see if the sound is getting triggered

#

did it print?

lethal pebble
green oyster
#

when u test

lethal pebble
#

1 sec lemme test

green oyster
#

oh

#

i see what you got wrong

#

local plr = Game.Players.LocalPlayer

lethal pebble
#

it aint printing nun bru

green oyster
#

um thats not the output

lethal pebble
#

also in the output

green oyster
#

ok then

green oyster
lethal pebble
#

aight

green oyster
#

makes sense

lethal pebble
#

but aight sure

green oyster
#

oh fuck

#

nah

#

dont

lethal pebble
#

aight

green oyster
#

gimme a sec

lethal pebble
#

im tryna make it so everybody could hear it

#

k

green oyster
#

which player are you getting?

#

at the start

lethal pebble
#

wdym

green oyster
#

who is that supposde to be

lethal pebble
#

i guess character

green oyster
#

is it just a character in the workspace

lethal pebble
#

no not really

green oyster
#

wtf is that then

#

im so condused

#

confused

lethal pebble
#

should i remove it then?

green oyster
#

its in server script?

lethal pebble
#

yeah

green oyster
#

fucking hell

#

um

#

none of that is going to work

lethal pebble
#

yo what

#

why

green oyster
#

where did you get these scripts from bro

lethal pebble
#

i made some of em myself

#

crouchfix works

#

disableforcefield works

#

third one works

#

sway works

green oyster
#

can i see crouch fix

lethal pebble
#

sure

#

all works except the 2 last ones

#

(i didnt make the 2 last ones myself)

#

the other ones i did

green oyster
#

alrighty

green oyster
lethal pebble
#

e

#

fix the crouching script i made

#

which works perfectly

green oyster
#

this one blud

lethal pebble
#

thats is supossed to make a sound when you get dmged

green oyster
#

okayyyy

#

so what you wanna do is

#

when a player is added

#

nvm ill give it

#

wait

lethal pebble
#

?

#

k

ionic gyro
#

Your not even playing the sound

green oyster
#

he is

#

he is using play on remove

lethal pebble
#

dang how you know

green oyster
#

ill fix it for him in a sec

#

bc i can tell

#

its not correct though

ionic gyro
#

And hes destroying the sound without a delay

green oyster
#

thats why its not correct

#

ik lil bro

#
local function PlayerAdded(player)
    local function CharacterAdded(character)
        local function Died()
            
            end
        end
        character.Humanoid.Died:Connect(Died)
    end
    player.CharacterAdded:Connect(CharacterAdded)

end
#

wait

lethal pebble
#

im still learning

green oyster
#

ima explain what u need to do to that

#

so when the character is added

green oyster
#

the server script

#

thats where u put

#

that

lethal pebble
#

crouchfix?

green oyster
#

then connect player added to players.PlayerAdded

#

no

#

we are going to re make

lethal pebble
#

should i stream to make it easier?

#

or nah

green oyster
#

yh

#

do

lethal pebble
#

aight less go general

ionic gyro
green oyster
#

yes bro ik

#

relax

#

we still have other things to do

ionic gyro
#

oh k

lethal pebble
#

so what now

green oyster
#

um

#

lemme see

#

scrip

#

yh

#

ur mic work

#

legit delte everything

#

all the code

#

first u need players

#

local players = Game:Getservice("PlayerService")

#

dont copy paste

#

justr players

#

i forgor

#

then copy that thing i sent

#
local function PlayerAdded(player)
    local function CharacterAdded(character)
        local function Died()
            
            end
        end
        character.Humanoid.Died:Connect(Died)
    end
    player.CharacterAdded:Connect(CharacterAdded)

end
green oyster
#

mb

#

someone called

#

now we just need to add a sound to the char

#

when they are 'added'

#

put that sound in replicated storage

#

thats the proper place to put

#

then we need to get another variable for replicated

#

like how we did for players

#

?

#

next to the last varible

#

'players

#

local players = ...

#

local replicated = ...]

#

yh

#

then we just clone the sound when the char is added

#

parent it to the humanoid

#

sound.Parent = char.Humanoid

#

silly billy

#

sorry what did u say

#

inside the char added function

#

yea but

#

the variable thing is character

#

so change it to that

#

bro u cant script at all u need to do more simple things

#

yh thats fine

#

thats because the game doesnt know

#

it will work trust

#

WE AINT FINSIHED

#

BRUH

#

go back to the script

#

lemme see script

#

the end on top of char added needs to go

#

the died function needs to be inside of char added

#

tbh u dont even need died

#

where u connect it

#

other

inner thunderBOT
#

studio** You are now Level 17! **studio

green oyster
#

yh

#

delete the connection for died

#

u need to clone the sound

#

u forgot that

#

now when the humanoid health chnages play the sound

#

remember PLAY the sound using sound:Play()

#

ight bro i have other stuff to do