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?
The t-shirt ID would go at the 'assetId' bit in the code below.
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,assetId) then