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

How can I make a script which specifiys all Players in a game and for example give them sparkles?

So, I've been trying to make a script which simply affects all players Ive tried localplayer and so forth but does not seem to be working can someone please tell me another way?

1 answer

Well, you would need to access all players at once, so you'd use something like this

for i, player in ipairs(game.Players:GetPlayers()) do

end	

That accesses all the players.

If you were putting sparkles, then you would put a sparkle object in replicatedstorage for example, and clone().parent it to the players character.

so you would implement this like so

repstorage = game.ReplicatedStorage
sparkle = repstorage.Sparkles

for i, player in ipairs(game.Players:GetPlayers()) do
		if player.Character then
			sparkle:Clone().Parent = player.Character
		end
	end	

that adds sparkles to all characters.

So you can modify that code for whatever you need.

1 comment

0

Thanks.

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