Hi! I'm making script which gonna wear player which clicked textbutton and I want it make randomly, I mean to choose randomly clothes and I made this. What is exactly wrong?
This is this script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local EventStorage = ReplicatedStorage.EventStorage
local clothing = {game.ReplicatedStorage.EventStorage.ClothingEvent2:FireServer(),game.ReplicatedStorage.EventStorage.ClothingEvent1:FireServer()}
script.Parent.MouseButton1Click:connect(function()
game.ReplicatedStorage.EventStorage = clothing[math.random(1, 2)]
end)

1 comment
make a table