I am trying to have an emote play when you click a box, but when you first open the game, the output says
10:38:45.009 Stack Begin - Studio
10:38:45.009 Script 'Players.omotashi.PlayerGui.Emotes.Frame.KatKick.KatKickEmote', Line 6 - Studio - KatKickEmote:6
10:38:45.009 Stack End - Studio
10:38:45.009 Humanoid is not a valid member of Model "Workspace.omotashi" - Client - DDEmote:7
10:38:45.009 Stack Begin - Studio
10:38:45.009 Script 'Players.omotashi.PlayerGui.Emotes.Frame.Default.DDEmote', Line 7 - Studio - DDEmote:7
10:38:45.009 Stack End - Studio
10:38:45.010 Humanoid is not a valid member of Model "Workspace.omotashi" - Client - MannEmote:6
10:38:45.010 Stack Begin - Studio
10:38:45.010 Script 'Players.omotashi.PlayerGui.Emotes.Frame.MannRobics.MannEmote', Line 6 - Studio - MannEmote:6
10:38:45.010 Stack End - Studio
I have even tried to add waiting for humanoid to load in but it still does this no matter what
All my Emote scripts have the same template as below
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Anim = Instance.new('Animation')
Anim.AnimationId = ANIMATION ID
local PlayAnim = Character.Humanoid:LoadAnimation(Anim)
local song = game.Workspace.Music.MUSICNAME
local DancingVal = script.Parent.Parent.Dance
DancingVal = false
local UI = script.Parent
UI.MouseButton1Click:Connect(function()
if DancingVal == false then
DancingVal = true
Character.HumanoidRootPart.Anchored = true
PlayAnim:Play()
song.Parent.MainArea.Volume = 0
song:Play()
PlayAnim.Stopped:Wait()
Character.HumanoidRootPart.Anchored = false
song.Parent.MainArea.Volume = 0.5
DancingVal = false
end
end)
--some variables are taken out to have privacy
Any help is fantastic!!