--Server Script
local RP = game:GetService("ReplicatedStorage")
local PoseEvent = RP:WaitForChild("Pose")
PoseEvent.OnServerEvent:Connect(function(player, DeBounce)
if game.Workspace:WaitForChild(player.Name).Stand.StandName.Value == "HierophantGreenSeugo" and DeBounce == false then
local UserPose = game.ServerStorage.HierophantGreenSeugo.Stand.UserPose
local StandPose = game.ServerStorage.HierophantGreenSeugo.Stand.StandPose
local SAnim = game.Workspace:FindFirstChild(player).Stand.StandHumanoid:LoadAnimation(StandPose)
local UAnim = game.Workspace:FindFirstChild(player).Humanoid:LoadAnimation(StandPose)
SAnim:Play()
UAnim:Play()
game.Workspace:FindFirstChild(player.Name).Humanoid.JumpPower = 0
game.Workspace:FindFirstChild(player.Name).Humanoid.WalkSpeed = 0
end
end)
--LocalScript
local UserInputService = game:GetService("UserInputService")
local RP = game:GetService("ReplicatedStorage")
local PoseEvent = RP:WaitForChild("Pose")
local DeBounce = false
UserInputService.InputBegan:Connect(function(input, IsTyping)
if input.KeyCode == Enum.KeyCode.G then
if IsTyping then
return
end
if DeBounce == false then
PoseEvent:FireServer(DeBounce)
DeBounce = true
elseif DeBounce == true then
PoseEvent:FireServer(DeBounce)
DeBounce = false
end
end
end)
‘player’ is an object, but FindFirstChild works with a name because it loops through to find a child with matching name.
local SAnim = game.Workspace:FindFirstChild(player.Name).Stand.StandHumanoid:LoadAnimation(StandPose)
local UAnim = game.Workspace:FindFirstChild(player.Name).Humanoid:LoadAnimation(StandPose)
SAnim:Play()
UAnim:Play()
yeah its works but in a half?
like only stand do animation but not the user
did i messed up somewhere?
local RP = game:GetService("ReplicatedStorage")
local PoseEvent = RP:WaitForChild("Pose")
PoseEvent.OnServerEvent:Connect(function(player, DeBounce)
if game.Workspace:WaitForChild(player.Name).Stand.StandName.Value == "HierophantGreenSeugo" and DeBounce == false then
local UserPose = game.ServerStorage.HierophantGreenSeugo.Stand.UserPose
local StandPose = game.ServerStorage.HierophantGreenSeugo.Stand.StandPose
local SAnim = game.Workspace:FindFirstChild(player.Name).Stand.StandHumanoid:LoadAnimation(StandPose)
local UAnim = game.Workspace:FindFirstChild(player.Name).Humanoid:LoadAnimation(StandPose)
SAnim:Play()
UAnim:Play()
game.Workspace:FindFirstChild(player.Name).Humanoid.JumpHeight = 0
game.Workspace:FindFirstChild(player.Name).Humanoid.WalkSpeed = 0
end
end)