game:GetService("UserInputService").InputBegan:Connect(function(input)
if input.KeyCode.Name == "P" and game.Players.LocalPlayer.Character then
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
while humanoidRootPart do
local Part = Instance.new("Part")
Part.Parent = workspace
Part.Material = Enum.Material.Glacier
Part.Position = humanoidRootPart.Position
end
end)
end)
end
end)
When I press P, it won't spawn a part in the players location.

2 comments
RemoteEvents are pretty cool! They have a lot of different uses.
Yea!