Guys, I would need help with a small model (box), and the things I need help with is:
When you click on a part of a model, what do I write in script like function(OnClick) or something (i forgot).
What do I write when I want for system to randomize stuff that could appear in a model? For example; 50% for hotdogs to spawn and 50% for paper to spawn.
What do I write in script when I open the box and it will print for example system spawned hotdogs inside the box and it should print “ItzCrime_bruh found hotdogs in a box!” (just it should say the user who opened box and who found hotdog)
function DoSomething()
local Rmath = math.random(1,2) -- Should be a 50%
if Rmath == 1 then
local A = Hotdog:Clone(); A.Parent = Model
else
local B = Paper:Clone(); B.Parent = Model
end
end
Model.Part.ClickDetector.MouseClick:Connect(DoSomething)
function DoSomething()
local Rmath = math.random(1,2) -- Should be a 50%
local model
if Rmath == 1 then
model = Hotdog:Clone()
else
model = Paper:Clone()
end
model.Parent = Model
end
Model.Part.ClickDetector.MouseClick:Connect(DoSomething)