#I have a gui that plays a animation but I want it to play for other players at the same time!

1 messages · Page 1 of 1 (latest)

compact laurel
#

.

#

So the gui has a button and this is the sript

#
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid", 10)
local CanEmote = true
local CoolDown = 0
local isPlaying = false
local dance 

btn.MouseButton1Click:Connect(function()
    if CanEmote then
        CanEmote = false
        if isPlaying then
            dance:Stop()
            isPlaying = false
        else
            if not dance then
                dance = hum:LoadAnimation(script:FindFirstChild("Anim1"))
            end
            dance:Play()
            isPlaying = true
        end
        wait(CoolDown)
        CanEmote = true
    end
end)```
drifting dust
#

use remote event to gt it into the server

#

let mer show exmple

#

so like local script when it gets input goes like

#

make a variable for remote event

#

and uses FireServer()

#

but inside the brackets roblox go like you need reason to fire server

#

so put localplayeer

#

then script makes variable for remotvent

#
script.Parent.RemoteEvent.OnServerEvent:Connect(function(player)
#

thne you play animation there

#

btw load animation on Animator humanoid got deprecated

#

if if correct

#

@daved

#

'davidwilliams

#

@compact laurel