Hi so im making an fps game, and i am making an gun npc that targets enemies at a certain folder, how do i do this. so everytime when a player joins their character is in a folder, instead of workspace.
uhhhh, it kinda has a error?
My bad, have to add a wait.
local characterFolder = Instance.new("Folder")
characterFolder.Name = "Characters"
characterFolder.Parent = workspace
game.Players.PlayerAdded:Connect(function (player)
player.CharacterAdded:Connect(function (char)
task.wait(1)
char.Parent = characterFolder
end)
end)
2 Likes
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.