Hell Roblox Devs!
I have an issue with my code and I don’t know why.
Goal:
There is a list of players inside a folder. I want thoughts to be moved back into the workspace.
Whats the problem?
When the player is moved to the workspace, the player just vanishes and doesn’t respawn
Code:
local Inside = script.Parent.Parent.SafePlayers:GetChildren()
for _, Search in ipairs(Inside) do
Search.Parent = game.Workspace.Parent
end
Why is it not working?
1 Like
Are you wanting to teleport them to a certain area? Also there’s a difference between a Character and a Player.
1 Like
No, I have the players that will not be attacked by an NPC inside a folder. I want them to be removed from the folder by using a code to put them into the game.workspace
The NPC recognizes players in the workspace and the workspace only
1 Like
The Player object is kept in the Players service. You can only interest with their character, humanoid etc. Not directly the object itself.
1 Like
set Search.Parent to workspace not workspace.Parent
1 Like
So I can’t move the model of the player character from a folder back to the workspace home?
1 Like
You are so right… My mistake and thank you all
1 Like
system
(system)
Closed
February 20, 2023, 12:14am
#8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.