Scripting Support

Hi developers, I have made a model that fades and falls when touched, but I don’t want everyone to see it, only the local player. How can I do this?

Here is the script:

local topPart = script.Parent
local parts = {}
for _, child in ipairs(model:GetChildren()) do
	if child:IsA("BasePart") then
		table.insert(parts, child)
	end
end
local busy = false

-- config
local goDown = 10
local duration = 1
----------

local iterations = duration * 30
local step = goDown / iterations

topPart.Touched:Connect(function()
	if busy then return end
	busy = true
	for i = 0, iterations do
		model:SetPrimaryPartCFrame(model:GetPrimaryPartCFrame() * CFrame.new(0, -step, 0))
		if parts == {} then wait() continue end
		for _, part in ipairs(parts) do
			part.Transparency = math.min(part.Transparency + 1/iterations, 1)
		end
		if i > iterations / 2 then
			for _, part in ipairs(parts) do
				part.CanCollide = false
			end
		end
		wait()
	end
	wait(1)
	for i = 0, iterations do
		model:SetPrimaryPartCFrame(model:GetPrimaryPartCFrame() * CFrame.new(0, step, 0))
		if parts == {} then wait() continue end
		for _, part in ipairs(parts) do
			part.Transparency = math.max(part.Transparency - 1/iterations, 0)
		end
		if i > iterations / 2 then
			for _, part in ipairs(parts) do
				part.CanCollide = true
			end
		end
		wait()
	end
	busy = false
end)

You’d fire the client via a RemoteEvent instance and perform the changes locally for that fired client only.

Just try firing clients using remote event to the client and then code a local script which will fade and falls the things u want