Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I anchor this accessory but still be able to try it on?

Someone please help me! Okay so i have this accessory u can try on. I want it to stand in place, but if i anchor it i get stuck in the item when i try it on.

1 answer

Make a duplicate of the accessory the player is touching and put it in ServerStorage, then put this script inside the accessory the player is touching's "Handle":

local touchpart = script.Parent --This is defining the part you are touching, make sure this is anchored
local tryonpart = game.ServerStorage.TryOnPart --This is the part you want your player to have, but change "TryOnPart" to whatever it's called and make sure it's unanchored

touchpart.Touched:Connect(function(hit) --This triggers when the player touches the part
	if hit and hit.Parent:FindFirstChild("Humanoid") then --This checks if the thing that touched it was a player
		
		local char = hit.Parent --Defining the player
		
		tryonpart.Parent = char --Parenting the part to the player (Teleporting it)
		
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.