JoJo stand pose script problem

Hello i made stands for one game and i have problem with pose script
where and what did i do wrong in it?

--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)

thanks for trying to help :flushed:

1 Like

‘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()
4 Likes

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)

I’ve just noticed but you loaded the stand pose for both stand and user.
Fix that and try again?

2 Likes

OMG why am i so blind, alright going to fix it

1 Like

yeah its got fixed, thanks you so much!

1 Like