I am trying to regen the players character when the player touches the part Sand. Help?
Asked by
4 years ago Edited 4 years ago
local player = workspace:FindFirstChild("Player")
local ResetPoint = player.Position
player.Position = Vector3.new(ResetPoint)
if game.ReplicatedStorage.GravityController:Destroy() then
local part = workspace.FindFirstChild("Sand")
part.Anchored = true
part.Parent = workspace
part.Touched:connect(function(hit)
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
hum.Health = 0
end
end)
end
if hum.Health = 0 and game.ReplicatedStorage.GravityController:Destroy() then
player.Position
end