n_cy
(n_cy)
August 23, 2020, 8:09pm
#1
The thing is I want to tween a earth wall going up inside the client
--Server
rEvent:FireAllClients(clonedWall, pos)
--Client
rEvent.OnClientEvent:Connect(function(clonedWall, pos)
local halfWall = clonedWall.Main.Size.Y
local tweenInfo = TweenInfo.new(3, Enum.EasingStyle.Linear)
local tween = tweenService:Create(clonedWall.Main, tweenInfo, {CFrame =
clonedWall.Main.CFrame * CFrame.new(0, math.abs(pos) + halfWall/2, 0)})
tween:Play()
end)
1 Like
FxEok
(fxe)
August 23, 2020, 8:23pm
#2
You might want to just use FireClient Instead of FireAllClients
.
2 Likes
n_cy
(n_cy)
August 23, 2020, 8:24pm
#3
why I want all the players to see the tween
1 Like
Messeras
(Mess)
August 23, 2020, 8:25pm
#4
FireClient()
is for the server.
FireServer()
is for one client
That’s what I’ve been told at least.
2 Likes
Messeras
(Mess)
August 23, 2020, 8:27pm
#7
Also, this will basically get the players in the game, then replicate the event across all of them, if you want a explanation on what it does.
2 Likes
FxEok
(fxe)
August 23, 2020, 8:29pm
#8
Yeah, it gets all players inside the Players service as a table and then FireClients on all Players inside the Players table.
1 Like
n_cy
(n_cy)
August 23, 2020, 8:30pm
#9
Its not working it only outputs on one of my clients
n_cy
(n_cy)
August 23, 2020, 8:30pm
#10
I understand what they are thank you though
FxEok
(fxe)
August 23, 2020, 8:31pm
#11
I think I can see whats going on, are you parenting the LocalScript when the PlayerAdded Event is fired?
Messeras
(Mess)
August 23, 2020, 8:32pm
#12
Perhaps you could try making the animation play within a Script in workspace. As far as I know, you can still listen to ServerEvents in Scripts in workspace. (Don’t make the script a parent of a brick, or it probably won’t work.)
n_cy
(n_cy)
August 23, 2020, 8:32pm
#13
I don’t quite understand what you mean but this is where i put my scripts
n_cy
(n_cy)
August 23, 2020, 8:33pm
#14
I’m going to try that thanks 30 cha
illusid
(Ozzie)
August 23, 2020, 8:38pm
#15
If that local script makes the brick tween you need to switch the parent to Starter Character or something then place a RemoteEvent in replicated storage.
It’s not working because the other clients don’t own that local script and aren’t connected to the remote event inside the tool.
7 Likes