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

How would I shirt a team's players VIA StringValue in workspace?

I've tried multiple ways of doing this, I used a 'for' loop, used a .Changed() function on the value In workspace, nothing worked. So I figured I'd come here for help.

When I say VIA stringvalue, I mean, If the value, team1, changes to "Alabama", then It gets the players of team1 [ AKA Deep blue team color] , and It changes their shirt to an alabama Jersey. If anyone could help me with this, I'd highly appreciate It.

1 answer

Did you set the .Changed properly?

So like it would be something like this. Let's say "Teemo" is the StringValue in the workspace.

workspace.Teemo.Changed:connect(teemo)

It will now connect to a function named "teemo".

function teemo()
-- do what you need to do here.
end

Now all you need to do is add an if statement for the value of the string(like "if teemo.Value == "mushrooms" then do whatever end)

I'm assuming you already know how to change their shirt because you are saying that you are having trouble with connecting it to a function or a loop.

2 comments

0

No, I'm having trouble with the actual shirt changing part, the rest works. Sorry for the misunderstanding.

0

Then all you would do is find the players shirt - change the ID of it. If they don't have a shirt - add it into their character. Or a easier method like - If player has shirt, remove, then add the shirt from the place where the shirts are located.

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