- What do you want to achieve? Keep it simple and clear!
I want to make a button that when is pressed it clones a model into a player
- What is the issue? Include screenshots / videos if possible!
After the button is pressed nothing happens
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have looked and found a post that had the same goal. I decided to edit the code but I might just screwed up. I used print to see if it actually does anything and it does. No errors at all.
Before you go hard on me I just want to say I am a beginner and it takes me time to understand.
local button = script.Parent
button.Activated:Connect(function()
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local item = game.ReplicatedStorage:WaitForChild("CircleGlasses"):Clone()
item.Parent = char
local Torso = char:WaitForChild("Torso")
local Head = char:WaitForChild("Head")
local Neck = Torso.Neck
item:SetPrimaryPartCFrame(Neck.C0)
print("Cloned part!")
end)