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

0

You don't really need WaitForChild if an object already exists in the first place

0

oh

0

so just get rid of it and it will work?

0

do i replace it? and which one?

0

can someone pls give me a more indepth answer

0

Like this "local Punch = rp:WaitForChild("Miststand1").Punch", also make sure RemoteEvent Punch exists in Folder Miststand1

0

bro thanks