#healing script

30 messages · Page 1 of 1 (latest)

late brook
#

Why use math.min

#

Just use Humanoid.Health = Humanoid.Health + healAmount

acoustic trench
#

either way it does the same thing

#

i tried both

late brook
#

Either way pointless using math.min

acoustic trench
#

yeah

#

so do yk why its doing dis

#

or nah

late brook
#

Something else is lowering it

#

Also why are you adding +100 healing 4 times when the if statement says while less than 100 health

acoustic trench
#

oops

#

didnt mean to keep the 100

#

its ment to say 25

late brook
#

A for loop will reduce the code amount dramatically

#

And take away math.min

acoustic trench
#

I got rid of the whole things

late brook
#

I have no idea how you could've got the idea to put it there

acoustic trench
#

bc i realized i already had a thing

#

for this

#

and thats why it was breaking

late brook
#

Yeah

acoustic trench
late brook
#

Huh

#

Well you should state it then

acoustic trench
#

ik

#
local announcedEvent = game.ReplicatedStorage.AnnouncedEvent
local TextService = game:GetService("TextService")

announcedEvent.OnServerEvent:Connect(function(player, inputText, enterPressed, newtext)
    local s, e = pcall(function()
        local newtext = TextService:FilterStringAsync(inputText, player.UserId):GetChatForUserAsync(player.UserId)
    end)
    if not s then warn(e) end
    inputText = newtext
    announcedEvent:FireAllClients(inputText, enterPressed)
end)```

any idea what i am doing wrong
late brook
#

No

#

I never used textservice

acoustic trench
#

ok

#

thanks