#Why Red underlined

42 messages · Page 1 of 1 (latest)

unkempt flint
#

local NormalJumpPower = 50

local UIS = game:GetService("UserInputService")

game:GetService("RunService").Heartbeat:Connect(function()
if Char:FindFirstChild("StopStun") then
Char:FindFirstChild("Humanoid").JumpPower = 0
Char:FindFirstChild("Humanoid").WalkSpeed = 0
return
end

if Char:FindFirstChild("Stun") then
    Char:FindFirstChild("Humanoid").JumpPower = 0
    Char:FindFirstChild("Humanoid").WalkSpeed = 3
    return
end

if Char:FindFirstChild("Blocking") then
    Char:FindFirstChild("Humanoid").JumpPower = 0
    Char:FindFirstChild("Humanoid").WalkSpeed = 5
end

if Char:FindFirstChild("NoJump") then
    Char:FindFirstChild("Humanoid").JumpPower = 0
end

if Char:FindFirstChild("NoJump") == nil then
    Char:WaitForChild("Humanoid").JumpPower = 50
end

UIS.InputBegan:Connect(function(input,istyping)
    if istyping then return end

    if input.UserInputType == Enum.UserInputType.MouseButton1 then 
        Char:FindFirstChild("Humanoid").WalkSpeed = 6
    end

    
if Char:FindFirstChild("StopStun") == nil and Char:FindFirstChild("Stun") == nil and input.UserInputType == Enum.UserInputType.MouseButton1 = nil and Char:FindFirstChild("Running") == nil and Char:FindFirstChild("NoJump") == nil and Char:FindFirstChild("Blocking") == nil then
    Char:FindFirstChild("Humanoid").JumpPower = NormalJumpPower
    Char:FindFirstChild("Humanoid").WalkSpeed = NormalWalkSpeed
    
end

Why is there this red underline what's the error?

vestal pilot
#

Hover your mouse over underlined text and see what it says

#

Probably you missed one end

unkempt flint
#

kk

#

what does this mean?

#

and also this

vestal pilot
#

It says that you forgot to put ")" and "end" somewhere

unkempt flint
#

oh i forgot about that

#

thnaks

unkempt flint
vestal pilot
#
RunService.Heartbeat:Connect(function()
-- code
end)
#

You forgot the ")"

faint apex
unkempt flint
#

idk whats wrong witit

vestal pilot
#

local Humanoid = Char:WaitForChild("Humanoid")

#

Then Humanoid.JumpPower = NormalJumpPower for example

unkempt flint
#

local player = game.Players.LocalPlayer

local Char = player.Character

local NormalWalkSpeed = 16
local NormalJumpPower = 50

local UIS = game:GetService("UserInputService")

game:GetService("RunService").Heartbeat:Connect(function()

#

the last line is line 10

#

it looks fine to me

unkempt flint
#

difference

#

what are these red dots on the scroll bar

#

probably the errors nvm

vestal pilot
#

Wait for child, waits for child with given name to appear

Find first child just gets the child with given name and if there's no it return nil

unkempt flint
#

mk

#

whats the difference between "to appear" and "get's the child"?

vestal pilot
#

For example

#

There is no part called "A" in workspace

#

workspace:FindFirstChild("A") will return nil

#

workspace:WaitForChild("A") will just wait forever

unkempt flint
#

ah alr

#

so eventually if it does appear the waitforchild action will work?

patent forum
unkempt flint
#

Kk

patent forum
#

btw i saw you so much in this channel xd

unkempt flint
#

Yeah lol

flint valleyBOT
#

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