#i need help for a block script pls

1 messages · Page 1 of 1 (latest)

fading coyote
#

yeah so i just want help bc when i spawn i am a block yes (that's what i wanted) but i fall and the camera is goofy who can help pls? here is the script : local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoid = character:WaitForChild("Humanoid", 5)
local rootPart = character:WaitForChild("HumanoidRootPart", 5)

    if not humanoid or not rootPart then
        warn("Character missing Humanoid or HumanoidRootPart for", player.Name)
        return
    end

    rootPart.Transparency = 1
    rootPart.CanCollide = false

    for _, item in pairs(character:GetChildren()) do
        if item ~= humanoid and item ~= rootPart then
            if item:IsA("BasePart") or item:IsA("Accessory") or item:IsA("Shirt") or item:IsA("Pants") or item:IsA("ShirtGraphic") then
                item:Destroy()
            end
        end
    end

    local block = Instance.new("Part")
    block.Name = "BlockBody"
    block.Size = Vector3.new(4, 4, 4) 
    block.BrickColor = BrickColor.new("Bright red")
    block.CanCollide = true  
    block.Anchored = false
    block.Massless = true
    block.Parent = character


    local weld = Instance.new("WeldConstraint")
    weld.Part0 = rootPart
    weld.Part1 = block     
    weld.Parent = block    

    character.PrimaryPart = rootPart

    humanoid.Health = humanoid.MaxHealth
    humanoid:ChangeState(Enum.HumanoidStateType.GettingUp) 

    humanoid.CameraOffset = Vector3.new(0, 2, 0) 
    humanoid.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
    humanoid.NameDisplayDistance = 0
end)

end)

slender palm
#

um

patent cypressBOT
#

studio** You are now Level 5! **studio

slender palm
#

can collide is on

#

make it false

fading coyote
#

thx lol that's was easy but look on the picture :

slender palm
#

what for game ur making?

fading coyote
#

"Be a block"

#

wanna help?

slender palm
#

idk man but i can take a look and maybe help u sometimes