Hello Developers!
So I been trying to do something like a height changer script for R6. Well just changing the size of the Body parts. But I want it to fire all the clients that it changed. And I am not really good at FiringClients or telling a script to fire all the clients.
The script:
--// Main Varibles
local Character = script.Parent.Parent.Parent
local Changed = game:GetService("ReplicatedStorage").Functions.Character:WaitForChild("HeightChanged")
local Ui = game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("Height").Frame.TextButton
--// Body Parts
local Humanoid = Character:WaitForChild("Humanoid")
local Torso = Character:WaitForChild("Torso")
local LeftArm = Character:WaitForChild("Left Arm")
local LeftLeg = Character:WaitForChild("Left Leg")
local RightArm = Character:WaitForChild("Right Arm")
local RightLeg = Character:WaitForChild("Right Leg")
--// Change Body Size
Ui.MouseButton1Click:Connect(function()
Torso.Size = Vector3.new(1, 1, 1)
end)
I’d recommend having your local script send something to your remote event to make it so that the change is visible on the whole server, instead of keeping it in the localscript, but up to you.
RemoteEvents are a way of sending information of triggering things by sending things to the server, and to the client. The client is your screen, the server is everyone’s screen. LocalScripts only replicate/work in the client and only you see what happens with LocalScripts. Regular Scripts work for the server. I won’t go too in depth, but if you want to read the basic functions/events of RemoteEvents I recommend going to the roblox page for it.