Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a player body scaling changes visible to other players?

Asked by 4 years ago

So i have been trying to make a game where you have to change body part sizes to complete an obstacle course. Here is the local script:

I know I have to use remote events and stuff but everything I have tried doesn't work.

local player = game.Players.LocalPlayer
local IQ = Instance.new("NumberValue")
IQ.Value = 100
IQ.Name = "IQ"
IQ.Parent = game.Workspace
IQ.Parent = game.Players.LocalPlayer.Character




local function OnClick()

    local person = player.Character
    person.Humanoid.HeadScale.Value = person.Humanoid.HeadScale.Value + 0.1000000000000000000
    IQ.Value = IQ.Value + 10
    if person.Humanoid.HeadScale.Value > 4 then
        person.Humanoid.HeadScale.Value = 4
    end

    if IQ.Value > 400 then
        IQ.Value = 400
    end
end


script.Parent.MouseButton1Click:Connect(OnClick)
0
If you have tried remote events, your trying something wrong. RunKittenzRComin 170 — 4y
0
Please send your remote event attempt RunKittenzRComin 170 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

This happens when your remote event set fire on client so people in the server couldn’t see it, you must set the Remote Event Fire on Server, this will be the example : Example :

local remote = game.ReplicatedStorage.RemoteEvent

remote.OnServerEvent:Connect(function()
   print(“Fired!”)
end

That script will able everyone in the server see the print! This is the fire script server to the printing script working example :

game.ReplicatedStorage.RemoteEvent:FireServer()

Try this code, if everyone on the server see it, try to execute it with your script, if not work, reply me this comment! Because I’m not in the studio but it must work for you!

Ad

Answer this question