So I have been trying to make this ability from a anime call cyberpunk edge runners the ability is called Sandevistan and in the anime it makes the person walk faster and there our these colorful after images that appear as the user moves. I decided to clone the player for the effect but I cant seem to clone the player?
game.ReplicatedStorage.SandevistanEvent.OnServerEvent:Connect(function(plr)
print("SandevistanEvent received")
local char = plr.Character or plr.CharacterAdded:Wait()
local FadeTime = 3
local TweenService = game:GetService("TweenService")
char.Torso.CanCollide = false
local San = char:FindFirstChild("Checks").San
game.Players.PlayerAdded:Connect(function(thisPlayer)
local playerName = thisPlayer.Name
print(playerName)
local playerToClone = (playerName)
function CloneMe(char) --a function that clones a player
char.Archivable = true
local clone = char:Clone()
char.Archivable = false
return clone
end
for i = 1, 35, 1 do
wait(0.1)
local charClone = CloneMe(game.Players[playerToClone].Character)
local LeftArm = TweenService:Create(charClone["Left Arm"], TweenInfo.new(FadeTime), {Transparency = 1})
local RightArm = TweenService:Create(charClone["Right Arm"], TweenInfo.new(FadeTime), {Transparency = 1})
local LeftLeg = TweenService:Create(charClone["Left Leg"], TweenInfo.new(FadeTime), {Transparency = 1})
local RightLeg = TweenService:Create(charClone["Right Leg"], TweenInfo.new(FadeTime), {Transparency = 1})
local torso = TweenService:Create(charClone.Torso, TweenInfo.new(FadeTime), {Transparency = 1})
local head = TweenService:Create(charClone.Head, TweenInfo.new(FadeTime), {Transparency = 1})
charClone.Parent = game.Workspace
charClone.HumanoidRootPart.Anchored = true
head:Play()
torso:Play()
LeftArm:Play()
RightArm:Play()
LeftLeg:Play()
RightLeg:Play()
game.Debris:AddItem(charClone,1)
end
end)
end)