Here's my script v v v It always work when I play solo but NEVER when I try playing with roblox player. :/ It's suppose to replace only the shirt of the player when he/she touches the block...
Platform = script.Parent Platform.Touched:connect(function(hit) local h = hit.Parent if h.ClassName ~= "Model" then return nil elseif h.ClassName == "Model" then h.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=65387140" end end)
Your method of checking to see if a Player hit your 'Platform' is easily broken. As well, the character may or may not have a Shirt object when you try to access it, you'll have to add one in if they don't. Try this code instead:
Platform = script.Parent Platform.Touched:connect(function(hit) local h = hit.Parent if not Game.Players:GetPlayerFromCharacter(h) then return end if not h.Shirt then Instance.new("Shirt", h).Name = "Shirt" end h.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=65387140" end)
You took it from Free Modules I guess. What does output shows you?