#scaling problem

30 messages · Page 1 of 1 (latest)

livid estuary
#

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character:ScaleTo(0.792) -- Make the character's size 0.792x smaller
end)
end)

real parrotBOT
#

studio** You are now Level 4! **studio

livid estuary
#

it activates when the player spawns in and I'm trying to make it only do that when the player steps on a part

valid forum
#

yeah, because you are listening for when a player is added

#

hence PlayerAdded

#

also, why do you have two?

jagged minnow
valid forum
#

to do it when the player touches a part you need a script inside the part:

script.Parent.Touched:Connect(function(oP)
  if op.jjkfdhglskfd --check if its a valid character part
    --scale
end)
#

something along the lines of that

livid estuary
jagged minnow
livid estuary
#

Ok

jagged minnow
real parrotBOT
#

studio** You are now Level 9! **studio

livid estuary
#

Nothing happens now

jagged minnow
jagged minnow
# livid estuary Nothing happens now

I think this should work :


local Part = workspace.Part -- This is a part you have created in the workspace

Part.Touched:Connect(function(hit)
    local character = hit.Parent
    if character:IsA("Model") then
     character:ScaleTo(0.792) -- Make the character's size 0.792x smaller
    end
end)
livid estuary
#

The part is called Head, would that affect it?

jagged minnow
# livid estuary The part is called Head, would that affect it?

Is the part is called Head then :


local Head = workspace.Head -- This is a part you have created in the workspace

Head.Touched:Connect(function(hit)
    local character = hit.Parent
    if character:IsA("Model") then
     character:ScaleTo(0.792) -- Make the character's size 0.792x smaller
    end
end)
jagged minnow
livid estuary
#

No

jagged minnow
livid estuary
#

In the part called head

#

It's for a morph

jagged minnow
jagged minnow
# livid estuary In the part called head

local Head = script.Parent -- This is a part you have created in the workspace

Head.Touched:Connect(function(hit)
    local character = hit.Parent
    if character:IsA("Model") then
     character:ScaleTo(0.792) -- Make the character's size 0.792x smaller
    end
end)
jagged minnow
# livid estuary It's for a morph

I want to make sure I understand what you want. Every time a player touches a part called "Head", it's character's size is 0.792x smaller ?

livid estuary
#

It works

#

Thanks