So basically I am trying to make it so that when a player presses E then a big wall appears ten studs in front of them in the direction they are facing please give me tips or if you have time give me an explaination because I am actually trying to understand codes I put in my game
local uis = game:GetService('UserInputService')
local wall = game.Workspace.MassiveMudWall.Part
local player = game.Players.LocalPlayer
local useStatus = false
local usePosition = player.Character.Position
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
print('Point1')
local massiveMudWall = Instance.new(brick, game.Workspace.MassiveMudWall)
massiveMudWall.Size = 31, 31, 2
massiveMudWall.Position = -18.5, 15.5, (usePosition + 5)
wait(5)
massiveMudWall:Destroy()
end
end)

1 comment
agreed