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

Not giving character clothes using MouseButton1Click and Events, any help?

Asked by
rdkv 12
6 years ago
Edited 6 years ago

Clothing Handler (LocalScript)

 local Event = game.ReplicatedStorage.GiveClothes
 local Shirt = "rbxassetid://603018153"
 local Pants = "rbxassetid://356105132"

 function ClothesInstance(plr)
    local character = plr.Character
    local shirt = character.Shirt
    local pants = character.Pants
    shirt.ShirtTemplate = Shirt
    pants.PantsTemplate = Pants
 end

 Event.OnServerEvent:Connect(ClothesInstance)

Give clothes on click script (LocalScript)


local button = script.Parent.Parent.ClothesButton local Event = game.ReplicatedStorage:WaitForChild("GiveClothes") button.MouseButton1Click:Connect(function() Event:FireServer() end)
0
Highlight the entire code and click the blue Lua icon to format your code correctly. RAYAN1565 691 — 6y
0
The scripts worked for me...you are certain that both scripts are not Disabled and that the event has been created as well as firing? Also on a side note, it is possible that a player is not wearing pants/a shirt so you should adjust your script accordingly to insert them if they aren't Vulkarin 581 — 6y
0
yeah User#19524 175 — 6y

Answer this question