Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I fix this script?(I fixed it) [closed]

Asked by 9 years ago

Never mind I fixed my problem

Locked by Shawnyg and adark

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
1
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
9 years ago

There is nogame.Workspace.Character.


If this is a LocalScript (e.g., in a GUI object in a PlayerGui), you can use game.Players.LocalPlayer.Character.

If this isn't a LocalScript, you would have to use script.Parent. ... .Character, to refer to the Player from within the PlayerGui.

If this is in a SurfaceGui or BillboardGui in the Workspace, you'll need to rework this to use one of the above combined with the Adornee property

1
Heh, you got Ninja'd. Shawnyg 4330 — 9y
Ad
Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

I'm puzzled. Is this supposed to change a Model's appearance whose name is "Character"? Or the player itself?

If it's the player, try this:

script.Parent.MouseButton1Click:connect(function()
    game.Workspace.Character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=170596150"
    game.Workspace.Character.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=170594552"
end)
0
It is supposed to change the clothing of a model in work space called Character FALZAR11 0 — 9y