Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I want my item to respawn when the timer reaches 0 but it gives me this error?

I'm making a game with keys, I have a little timer and when it reaches zero, the key is supposed to respawn, but when I play test, it gives me this error...

"YellowSpawn is not a valid member of workspace" -- yellow spawn is the key spawn

Here is my script:

game.ReplicatedStorage.Values.Seconds.Changed:Connect(function()
	if game.ReplicatedStorage.Values.Seconds.Value == 0 then
		wait(1)
		game.ReplicatedStorage.Values.Seconds.Value = 6
		workspace.YellowKey.Handle.Position = workspace.YellowSpawn.Position -- This is the part
	end
end)

Thank you if you can help!

2 comments

0

Well then it's not in the workspace

0

yea can collide made it fall out of the map

2 answers

✓ Accepted answer

Ensure that your part is either anchored and/or disable collision to maintain it from moving.

If you cant find you part in workspace, can collide maybe made it fall...

This discussion is preserved as it was. New answers, comments, and votes are closed.