local Gun = game.Workspace.Gun
local Shoot = game.ReplicatedStorage.shoot
local players = game:GetService("Players")
local player = players.LocalPlayer
local mouse = player:GetMouse()
local cooldown = 1.5
local function onclick()
if player.Character:FindFirstChildOfClass("Gun") then
shoot:FireServer(mouse.Hit.p)
end
end
Gun.Activated:Connect(onclick)
wait(cooldown)
#shoot is not a valid member of ReplicatedStorage "ReplicatedStorage"
1 messages · Page 1 of 1 (latest)
Gun isnt a class, so usew FindFirstChild + the wait(cooldown) wont do anything if ur tryna prevent spamming. Add cooldown logic in the function if you want that
okay
thank you!
i will go test it
Same Error
God dang it
yes
it is a local scirpt
and outpout is the same as the title of the
post?
yeah post
ok then
maybe say this? local Shoot = game.ReplicatedStorage:WaitForChild("Shoot")
I think the problem was prob that since luau is case sensitive, and since its shoot and Shoot, thats why it dont find it
