Hi, I am attempting to make a part where if you touch it you get stunned to the ground, this is what I attempted already:
script.Parent.Touched:Connect(function(hit)
for i,v in pairs(game.Workspace:GetChildren()) do
if v:IsA("BasePart") and v.Name == "HumanoidRootPart" then
v:Destroy()
end
end
end
end)
script.Parent.Touched:Connect(function(partThatTouched)
local Player = game.Players:GetPlayerFromCharacter(partThatTouched)
if Player then
Player.Character.HumanoidRootPart:Destroy()
end
end)
Pretty sure this would kill the player though, not make them fall to the ground.
script.Parent.Touched:Connect(function(hit)
local Player = game.Players:GetPlayerFromCharacter(hit)
if Player then
Player.Character.Humanoid.PlatformStand = true
end
end)