Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a object move based on if a player clicks a button?

How do I make this part move?

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
    
wait(2)

part:Destroy()

end

end)

1 comment

0

On line 11 change it to | part.CFrame = game.Workspace.world_kiLLer.RightFoot.CFrame | I may have spelt world_kiLLer wrong, I don't know if they are capital I's or capital l's.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.