Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i change the size of the part?

Asked by 5 years ago

why wont the size change

    game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
    if key == tostring(" ")  then
wait(0.2)
        local part = Instance.new("Part")
part.Position = game.Workspace.world_kiIIer.RightFoot.Position
part.Transparency = 1
part.Size = Vector3.new(4, 1, 4)
part.CanCollide = true
part.Anchored = true
wait(2)
part:Destroy()
    end
end)

im trying to make an infinite jump but the size isnt good

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

You are using a deprecated function "KeyDown" let's update it.

local UIS = game:GetService('UserInputService')
 subinput = UIS.InputBegan:connect(function(input,gameProcessedEvent)
 if gameProcessedEvent then return end
     if input.KeyCode == Enum.KeyCode.Space then    
     local part = Instance.new("Part")
     part.Position = game.Workspace.world_kiIIer.RightFoot.Position
     part.Transparency = 1
     part.Size = Vector3.new(4, 1, 4)
     part.CanCollide = true
     part.Anchored = true
     wait(2)
     part:Destroy()
     end
 end)
0
i forget to say, it should be LocalScript and inside StarterGui or StarterPlayer.StarterCharacterScripts iagometroid 61 — 5y
0
it is exacly that but i need help with the size Gameplayer365247v2 1055 — 5y
0
and with this it wont run if i click space Gameplayer365247v2 1055 — 5y
0
oh, you want a button? i thought you wanted Mouse Click... let me edit. iagometroid 61 — 5y
View all comments (3 more)
0
i also knows that the function in my own script works becuase i have used it without the size and it wworks perfectly that way Gameplayer365247v2 1055 — 5y
0
ur script is not working at all and i ONLY needed help with the size, the rest of the script works just fine Gameplayer365247v2 1055 — 5y
0
did you press the space bar? Fad99 286 — 5y
Ad

Answer this question