Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I fix the not a valid member?

Asked by 3 years ago
Edited 3 years ago
local Player = game:GetService("Players").LocalPlayer

local rp = game:GetService("ReplicatedStorage")
local Punch = rp:WaitForChild("Miststand1"):WaitForChild("Punch")

local UIS = game:GetService("UserInputService")

local debounce = false
local cooldown = .75

UIS.InputBegan:Connect(function(input,IsTyping)
    if IsTyping then
        return
    elseif input.UserInputType == Enum.UserInputType.MouseButton1 then

        if workspace:FindFirstChild(Player.Name.." Stand") then
            if debounce == false then
                debounce = true

                Punch:FireServer()

                wait(cooldown)
                debounce = false
            end
        end
    end
end)

the thing i need help with is line 3 Error:Waitforchild is not a valid member of Folder "ReplicatedStorage.Miststand1"

0
You don't really need WaitForChild if an object already exists in the first place cherrythetree 130 — 3y
0
oh Not_prototype 50 — 3y
0
so just get rid of it and it will work? Not_prototype 50 — 3y
0
do i replace it? and which one? Not_prototype 50 — 3y
View all comments (3 more)
0
can someone pls give me a more indepth answer Not_prototype 50 — 3y
0
Like this "local Punch = rp:WaitForChild("Miststand1").Punch", also make sure RemoteEvent **Punch** exists in Folder **Miststand1** cherrythetree 130 — 3y
0
bro thanks Not_prototype 50 — 3y

Answer this question