-
What do you want to achieve?
To make like a transformation game/ like kaiju paradise but not furries. -
What is the issue?
instead of it going to right way, it tweens to another size. -
What solutions have you tried so far?
i tried other things but the others not help with my problem.
i was trying to make a game like kaiju paradise but u turn into robots
local Teams = game:GetService("Teams")
local CS = game:GetService("CollectionService")
local tag = "Random"
local targetPart = nil
local partsToTransform = {}
local TS = game:GetService("TweenService")
for _, object in pairs(CS:GetTagged(tag)) do
object.Touched:Connect(function(obj)
local characterName = game.ReplicatedStorage.Characters.Bots:GetChildren()
local character = characterName[math.random(1, #characterName)]
local plr = game.Players:GetPlayerFromCharacter(obj.Parent)
if plr and plr.Team == Teams["Human"] then
plr.Character.Humanoid.WalkSpeed = 0
plr.Character.Humanoid.JumpPower = 0
plr.Team = Teams.Bots
local plrRoot = obj.Parent:FindFirstChild("HumanoidRootPart")
local effectclone = character:Clone()
effectclone.Name = ""
effectclone.Parent = workspace
local rootPartfake = effectclone:FindFirstChild("HumanoidRootPart")
rootPartfake.CFrame = plrRoot.CFrame
local weld = Instance.new("Weld", rootPartfake)
weld.Part0 = rootPartfake
weld.Part1 = plrRoot
for i, v in pairs(effectclone:GetChildren()) do
if v:IsA("Part") or v:IsA("MeshPart") then
v.Massless = true
end
end
task.wait(1)
for _, object in pairs(effectclone:GetChildren()) do
if object:IsA("Part") then
if not targetPart then
targetPart = object
else
table.insert(partsToTransform, object)
end
end
end
if targetPart then
local targetSize = targetPart.Size
local targetColor = targetPart.Color
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
for _, part in pairs(partsToTransform) do
local originalCFrame = part.CFrame
local tweenSize = TS:Create(part, tweenInfo, {Size = targetSize})
local tweenColor = TS:Create(part, tweenInfo, {Color = targetColor})
tweenSize:Play()
tweenColor:Play()
end
else
warn("No target part selected.")
end
print(partsToTransform)
task.wait(3)
effectclone:Destroy()
local charClone = character:Clone()
charClone.Name = plr.Name
plr.Character = charClone
local rootPart = charClone:FindFirstChild("HumanoidRootPart")
if rootPart and plrRoot then
rootPart.CFrame = plrRoot.CFrame
end
charClone.Parent = workspace
end
end)
end