How can I make this happen only on the client side?

How could I take a script like this and make it only affect the person who touched it?

script.Parent.Touched:Connect(function(hit)

	if hit.Parent:FindFirstChild("Humanoid") then
		while script.Parent.Transparency <= 1 do
			script.Parent.Transparency += .1
			wait(.1)
		end
		script.Parent.CanCollide = false
	end
end)

The person who touched the part will see it fade away, but a bystander shouldn’t see any change to the cube unless they touch it themselves.

have you tried putting it in a local script?

Yes. Nothing happens to the part

You can use a remoteEvent to tell the client to turn transparent.

do that , but replace within the event in the local script with the code that makes the part fade

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.