game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(Player)
local Character = Player.Character
local HumanoidDesc = game.Players:GetHumanoidDescriptionFromUserId(Player.UserId)
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
Humanoid:ApplyDescription(HumanoidDesc)
end)
end)
local Gui = script.Parent
local ViewportCamera = Instance.new("Camera")
ViewportCamera.CFrame = Gui.Adornee.CFrame
ViewportCamera.FieldOfView = 80
Gui.ViewportFrame.CurrentCamera = ViewportCamera
print("yas")
local RemoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent", 5)
local DetectZone = Gui.Adornee.Parent.DetectionZone
local Prompt = Gui.Adornee.Attachment.ProximityPrompt
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local debounce = false
print("cat")
Prompt.Triggered:Connect(function()
print("triggered")
if debounce == true then return end
debounce = true
Prompt.Enabled = false
Gui.ViewportFrame:ClearAllChildren()
print("boblox")
task.wait(1)
local Parts = workspace:GetPartBoundsInBox(DetectZone.CFrame, DetectZone.Size)
for _, part in Parts do
local PartClone = part:Clone()
PartClone.Parent = Gui.ViewportFrame
print("part cloned")
RemoteEvent:FireServer(Character)
print("server fired")
end
Prompt.Enabled = true
debounce = false
print("yea yea")
end)
Server script:
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(Player, Character : Model)
print("character")
local Humanoid : Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
print("yes")
local HumanoidDesc = game.Players:GetHumanoidDescriptionFromUserId(Player.UserId)
print("hi")
Humanoid:ApplyDescriptionReset(HumanoidDesc)
print("desc applied!")
end)
Everything prints, so I couldn’t locate the problem.