o1-preview-2024-09-12· OpenAI
WildChat-4.8M (AI2)
crie um servecript que busque o model do jogador pelo nome dele na workspace e mude a…
- User
crie um servecript que busque o model do jogador pelo nome dele na workspace e mude a propriedade scale quando ele entrar no jogo/morrer/reswpanar para 1.161
- Assistant
Claro! Aqui está um script que faz exatamente o que você pediu. Este script deve ser colocado em ServerScriptService como um Script do servidor.
local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function() -- Aguarda o modelo do jogador aparecer na Workspace pelo nome dele local character = workspace:WaitForChild(player.Name) local humanoid = character:WaitForChild("Humanoid") if humanoid then -- Define a escala para 1.161 local bodyDepthScale = humanoid:FindFirstChild("BodyDepthScale") if bodyDepthScale then bodyDepthScale.Value = 1.161 end local bodyHeightScale = humanoid:FindFirstChild("BodyHeightScale") if bodyHeightScale then bodyHeightScale.Value = 1.161 end local bodyWidthScale = humanoid:FindFirstChild("BodyWidthScale") if bodyWidthScale then bodyWidthScale.Value = 1.161 end local headScale = humanoid:FindFirstChild("HeadScale") if headScale then headScale.Value = 1.161 end end end) end)