Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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 ready = true









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]
		local AnimaTrack = hum:LoadAnimation(animation)
		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
		hum.HeadScale.Value= hum.HeadScale.Value+5
		
		punch.Disabled = false
		wait(1)
		hum.WalkSpeed = 40
		ready = false

				end
			end
				
				
input.InputBegan:connect(Hulk)

THANK YOU IN ADVANCE!

3 comments

0

You need to modify the size on a server script.

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?

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.

1 answer

✓ Accepted answer

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()
	--Make your avatar thicc
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

1 comment

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 :>

This discussion is preserved as it was. New answers, comments, and votes are closed.