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

How do i make a UI Button that when activated a model..?

Asked by 4 years ago

How do i make a UI Button that when activated a model from ServerStorage will :Clone() on workspace near the player, please help?

I wanted to make a gui that when you click it, a mesh/model/part/etc.. will appear infront of you, if you have any ideas on how it would work please comment down below, thank you.

1 answer

Log in to vote
0
Answered by 4 years ago

If you want only the player to see the model, then, in a localscript with the button as a parent:

script.Parent.Activated:Connect(function(player)
local model = game.ServerStorage.URMODEL -- replace with whatever ur model is
local clone = model:Clone()
clone.Parent = workspace
local char = workspace:FindFirstChild(player.Name)
clone.CFrame = char.Torso.CFrame * CFrame.new(0,0, 6)
end)

If you want everyone to see the model, dm me on discord BlobMaster#8156 and we can discuss Remote Events. Otherwise, accept this as your answer, if it works ofc ;)

Ad

Answer this question