I’m trying to make a system where when they spawn in with the new character it does a little transform effect. but it needs to be able to be used multiple times so I cloned it, but now it wont play the tween I think its because the script is confused cause there’s 2 shockwaves maybe? I’m not sure so I’m here to ask for help.
local remote = game.ReplicatedStorage.Change
local camerashake = require(game.Workspace.CameraShaker)
local function ChangeCharacter(player)
local newchar = game.Workspace.rimuru:Clone()
newchar.Name = "StarterCharacter"
newchar.Parent = game.StarterPlayer
newchar.PrimaryPart = newchar:WaitForChild("HumanoidRootPart")
newchar:WaitForChild("Humanoid").HipHeight = 0
local floop = game.Workspace.Shockwave:Clone()
local tweenservice = game:GetService("TweenService")
local info = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local goal = {
Size = Vector3.new(83.865, 4.9, 83.865)
}
local create1 = tweenservice:Create(floop, info, goal)
--tweening to make transparent
local info = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
local goal = {
Transparency = 1
}
local create2 = tweenservice:Create(floop, info, goal)
player:LoadCharacter(newchar)
local Humanoid = player.Character:WaitForChild("Humanoid")
create1:Play()
create2:Play()
floop.Position = player.Character.HumanoidRootPart.Position
end
remote.OnServerEvent:Connect(ChangeCharacter)