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

How to move part from ReplicatedStorage to Workspace for only special player ?

I have a folder with parts inside ReplicatedStorage and I want it to move to Workspace if a player touches a part, but only for the player that touched that part.

Here's the script:<

local planks = game.ReplicatedStorage.WoodPlanks
local sound = planks.SoundPlayer.Planks

script.Parent.Touched:connect(function(hit)
	if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
		planks.Parent = game.Workspace
		sound:Play()
	end
end)

2 answers

✓ Accepted answer

Make it so that in the local script it has an event for when a player touches a part, that event moves the part to the workspace. Doing this inside a local script in StarterPlayerScripts will be the easiest solution

Using a local script should do this, but '.Touched' might not work in local scripts. If that happens, use a remote event.

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