-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatformunderplayer.lua
More file actions
30 lines (24 loc) · 964 Bytes
/
Copy pathplatformunderplayer.lua
File metadata and controls
30 lines (24 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local UIS = game:GetService("UserInputService")
local function createPlatform()
if not character or not character:FindFirstChild("HumanoidRootPart") then return end
local rootPart = character.HumanoidRootPart
local position = rootPart.Position - Vector3.new(0, 3, 0)
local platform = Instance.new("Part")
platform.Name = "PlayerPlatform"
platform.Size = Vector3.new(5, 1, 5)
platform.Position = position
platform.Anchored = true
platform.CanCollide = true
platform.Transparency = 0.3
platform.Color = Color3.fromRGB(0, 170, 255)
platform.Parent = workspace
--game:GetService("Debris"):AddItem(platform, 5)
end
UIS.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.Z then
createPlatform()
end
end)