how do i make it so that when a GUI shows on the screen, the player will click a button and then wear models I’ve made when they click a certain button, (there’s 8 buttons). How would I do this? also I’m not sure if this is the right topic. Thanks for the help!
I can’t show you exactly how to do it, but I can give a rough concept of how it could look like:
-- Client Side
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("Remote Event")
Button.Activated:Connect(function() -- When that button is clicked
Event:FireServer(Button.Name) -- Send over the button Name, Ideally you want it to be the same as you wearable items name
end)
-- Server Side
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("Remote Event")
Event.OnServerEvent:Connect(function(player, itemName)
-- Then you can get the models you need
-- Now you have the player who clicked it and the itemName
-- You would just need to find the model and apply it to the character
end)
Hope this helps, sorry if the Server Side was a bit Vague but I didn’t quite understand what you needed. Clothing? or some sort of Armour?
no not clothing, literally just some models I’ve made like a sword that appears on the players back
You would need to use RemoteEvents
if you don’t already know how the client-server model works, you should learn that because that is vital to making a game with FilteringEnabled (every game now)
Ah, I see well that’s a little more complicated in a way. You would need to look into CFrames and welds.
-- Step by Step
-- Clone the weapon
-- Create a Weld on the torso, and weapon
-- Mess around with the CFrames to get it exactly how you want it
-- Parent it to the player.Character
That should be a rough setup, hopefully this helps. You can learn about CFrames here and more info here. Here is more info about Welds. Good luck