Still have questions? Join our Discord server and get real time help.
0

# Why this thing i made only Visible for myself?

So i made this script and it totally worked but the thing is, When i play with others i only saw myself become big but the others are just normal and floating to the air?

this is the Local Script

local input = game:GetService("UserInputService")
local player = game.Players.LocalPlayer

local animations = {2469483212}

local function Hulk(inputObject)
if inputObject.KeyCode == Enum.KeyCode.LeftAlt and ready then
local char = player.Character or player.CharacterAdded:Wait()
local hum = char.Humanoid
local animation = Instance.new("Animation")
local picked = 1
local punch = script.Parent.Punch_Local
animation.AnimationId = "http://roblox.com/asset/?id="..animations[picked]
AnimaTrack:Play()
hum.WalkSpeed = 0
wait(.01)
print(player)
hum.BodyDepthScale.Value=hum.BodyDepthScale.Value+5
hum.BodyWidthScale.Value=hum.BodyDepthScale.Value+5
hum.BodyHeightScale.Value=hum.BodyHeightScale.Value+5

punch.Disabled = false
wait(1)
hum.WalkSpeed = 40

end
end

input.InputBegan:connect(Hulk)


0
You need to modify the size on a server script. RayCurse 1353 — 8mo
0
Server Script is the "Script " Right? But how am i going to do that? Do the same thing as what i did on a local script? Pdpieee 1 — 8mo
0
Use a remote event that fires to the server inside that function. The server will then listen for it and increase the scale. You should just have to use lines 33 to 36. WalkSpeed should also be changed on the server. xPolarium 1337 — 8mo

0
cc567 50
8 months ago
Edited 8 months ago

This is because you're taking into consideration FilteringEnabled. What this does is limits local scripts on each players clients to only modify the client themselves (which is why only you see yourself large). What you must do is call a remote event. The remote event has an event called (OnServerEvent). Connect the size change to the OnServerEvent like so

Note: The script connecting the RemoteEvent is a regular script (NOT LOCAL)

RemoteEvent = game.ReplicatedStorage.RemoteEvent

RemotrEvent.OnServerEvent:Connect(function()
end)


Now in the local script you don't change the size directly, but you activate the event (which will change the size as seen above)

RemoteEvent = game.ReplicatedStorage.RemoteEvent

RemoteEvent:FireServer() --[[This will make the avatar larger since the size change is now connected to the RemoteEvent everytime it fires]]--


Let me know if you have any questions

0
THANK YOU VERY MUCH. but i have another question, i can't disable the punch script now when i am not large yet. Thanks again :> Pdpieee 1 — 8mo