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

I need help! T-shirt being able to modify humanoid stats!?

I wanted to make a script where if you buy a certain t-shirt the script would be able to change that person's speed & health. I'm not sure if this is correct but..

game.Players.PlayerAdded:connect(function(plr) if game:GetService("MarketplaceService")PlayerOwnsAsset(plr,assetId) then plr.CharacterAdded:connect(function(char) humanoid = char:WaitForChild("Humanoid") humanoid.WalkSpeed = amount humanoid.MaxHealth = amount humanoid.Health = amount end) end end)

Even if i did try this where would i put the t-shirt id?

1 answer

✓ Accepted answer

The t-shirt ID would go at the 'assetId' bit in the code below.

if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,assetId) then

4 comments

0

Thank you so much!

0

Could you accept the answer?

0

One more thing. Where do i put this script in studio & What script would it be? I'm new to this.

0

You would put it in a server sided place. Like workspace or serverscriptservice

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