#Friend gave me a script, but I dont know how to change it

22 messages · Page 1 of 1 (latest)

fervent gull
#

there is a local smallCharacter, i am trying to make that small character into the player character

orchid granite
#

Where is the script

#

Paste it here

fervent gull
#

ok

#

`local transformEvent = game.ReplicatedStorage:WaitForChild("Transform")
local unTransformEvent = game.ReplicatedStorage:WaitForChild("Untransform")

local currentForm = game.ReplicatedStorage:WaitForChild("Transformed").Value

local vampCharacter = game.ReplicatedStorage.Characters:WaitForChild("Vamp")
local smallCharacter = game.ReplicatedStorage.Characters:WaitForChild("Small")`

#

that is the first part

#

i think this glitched

#

it says i cant deliver it

#

because i dont share a server

#

but i made the post

#

anyways

#

`local coolDown = 4

transformEvent.OnServerEvent:Connect(function(player)
if currentForm == "Small" then
local charClone = vampCharacter:Clone()
charClone.Name = player.Name

    charClone:SetPrimaryPartCFrame(player.Character.HumanoidRootPart.CFrame)

    player.Character = charClone

    if player:FindFirstChild("Animate") then
        local anim = player:FindFirstChild("Animate"):Clone()
        anim.Parent = charClone
    end

    local rootPart = charClone:FindFirstChild("HumanoidRootPart") or charClone:FindFirstChild("Torso")
    local plrRoot = player.Character:FindFirstChild("HumanoidRootPart") or player.Character:FindFirstChild("Torso")

    if rootPart and plrRoot then
        rootPart.CFrame = plrRoot.CFrame
    end

    charClone.Parent = workspace

    if rootPart:FindFirstChild("Lightning") then
        rootPart:FindFirstChild("Lightning").Enabled = true
        wait(0.5)
        rootPart:FindFirstChild("Lightning").Enabled = false
    end

    local flash = Instance.new("PointLight",rootPart)
    flash.Brightness = 3
    game:GetService("Debris"):AddItem(flash,0.1)

    currentForm = "Vamp"

    wait(coolDown)
    unTransformEvent:FireClient(player)

elseif currentForm == "Vamp" then
    local charClone = smallCharacter:Clone()
    charClone.Name = player.Name`
#

second part

#

`charClone:SetPrimaryPartCFrame(player.Character.HumanoidRootPart.CFrame)

    player.Character = charClone

    if player:FindFirstChild("Animate") then
        local anim = player:FindFirstChild("Animate"):Clone()
        anim.Parent = charClone
    end

    local rootPart = charClone:FindFirstChild("HumanoidRootPart") or charClone:FindFirstChild("Torso")
    local plrRoot = player.Character:FindFirstChild("HumanoidRootPart") or player.Character:FindFirstChild("Torso")

    if rootPart and plrRoot then
        rootPart.CFrame = plrRoot.CFrame
    end`
#

3rd part

#

`local rootPart = charClone:FindFirstChild("HumanoidRootPart") or charClone:FindFirstChild("Torso")
local plrRoot = player.Character:FindFirstChild("HumanoidRootPart") or player.Character:FindFirstChild("Torso")

    if rootPart and plrRoot then
        rootPart.CFrame = plrRoot.CFrame
    end
    
    charClone.Parent = workspace
    
    if rootPart:FindFirstChild("Lightning") then
        rootPart:FindFirstChild("Lightning").Enabled = true
        wait(0.5)
        rootPart:FindFirstChild("Lightning").Enabled = false
    end
    
    local flash = Instance.new("PointLight",rootPart)
    flash.Brightness = 3
    game:GetService("Debris"):AddItem(flash,0.5)
    
    currentForm = "Small"
    
    wait(coolDown)
    unTransformEvent:FireClient(player)
end

end)`

#

last part

orchid granite
#

paste it like this

#

` <-- is next to the 1 on your keyboard

fervent gull
#

still too long

#

i need 619 less