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"

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