I need help with cloning a script into a player’s backpack. I’ve tried anything but it seemed to not work.
Here’s one of the codes I tried:
local Player = game.Players.LocalPlayer
local Script = game.ReplicatedStorage.ScriptsAndExtras.BlackHoleEffect
local Backpack = Player:FindFirstChild("Backpack")
local CloneScript = Script:Clone()
--// Code\\--
wait(3)
CloneScript.Parent = Backpack
game:GetService("RunService").RenderStepped:connect(function()
if (distort > 0.001) then
cam.CoordinateFrame=cam.CoordinateFrame*CFrame.new(0,0,0,distort,0,0,0,distort,0,0,0,1)
distort = distort - 0.001
end
end)
I am remaking the normal elevator the old version, and the black hole floor needs this script.
You can test it by placing the BlackHoleEffect script in the StarterGui.
Since the PlayerGui is the same as the StarterGui, except it doesn’t reset the script when the Player Dies.
Any LocalScript will run as soon as it is inserted into a PlayerGui.