How do I make local parts visible globally without using remote events?

can you please fix the indentation first?

There’s no problem with the indentation though? The indentation is fine, I simply just don’t make that many functions in the script.

Wait, sorry. Here:

-------------------------------------------------Define Variables
hold=nil --used to notify the loop
player=script.Parent.Parent.Parent
run=game:GetService("RunService")

chat=game:GetService("Chat")
enabled=true
---------------------------------------------------KeyDownFunction

function onButtonDown(mouse)
	if not enabled then return end
	enabled=false
	if player.PlayerGui.HealthGui.Mana.Value < 20 then
		return end
	hold=true
	---CFrame Variables
	LeftShoulder=player.Character.Torso["Left Shoulder"]
	RightShoulder=player.Character.Torso["Right Shoulder"]
	value1 = LeftShoulder.C0
	value2 = RightShoulder.C0
	Run = game:GetService("RunService")
	---CFrame Variables End
	bodypos = Instance.new("BodyPosition",player.Character.Torso)
	bodypos.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
	bodypos.Position = player.Character.Torso.Position
	bodygyro = Instance.new("BodyGyro",player.Character.Torso)
	bodygyro.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
	bodygyro.CFrame = CFrame.new(player.Character.Torso.Position,mouse.Hit.p)
	bodygyro.P = 8500
	player.Character.Humanoid.JumpPower = 0
	------Create Fire Effect
	f = script.Glow:clone()
	f.Parent = player.Character.Torso
	f.CFrame = player.Character:FindFirstChild("Right Arm").CFrame*CFrame.new(0,-3,0)
	w = Instance.new("ManualWeld",player.Character:FindFirstChild("Right Arm"))
	w.Part0 = player.Character:FindFirstChild("Right Arm")
	w.Part1 = f
	w.C1 = CFrame.new(0,3,0)
	f2 = script.Glow:clone()
	f2.Parent = player.Character.Torso
	f2.CFrame = player.Character:FindFirstChild("Left Arm").CFrame*CFrame.new(0,-3,0)
	w = Instance.new("ManualWeld",player.Character:FindFirstChild("Left Arm"))
	w.Part0 = player.Character:FindFirstChild("Left Arm")
	w.Part1 = f2
	w.C1 = CFrame.new(0,3,0)
	------Fire Effect End
	RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(-1, 0, 0)
	LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(-1, 0, 0)
	player.PlayerGui.HealthGui.Mana.Value = player.PlayerGui.HealthGui.Mana.Value - 20
	charge()
end

-----------------------Charge Function



function charge()
	local size=1
	local rocksize=2
	local count=1
	local damage=(player.leaderstats1.Level.Value*2)
	local mouse = player:GetMouse()
	while hold==true and count<=20 and player.PlayerGui.HealthGui.Mana.Value > 0 do---Charging
		wait(0.001)
		player.PlayerGui.HealthGui.Mana.Value = player.PlayerGui.HealthGui.Mana.Value - 2
		bodygyro.CFrame = CFrame.new(player.Character.Torso.Position,mouse.Hit.p)
		damage=damage+2
		count=count+0.5
		size=size+0.1
		rocksize=rocksize+0.2
	end
	chat:Chat(player.Character.Head,"Spacial Barrage!",Enum.ChatColor.Green)
	player.leaderstats1.XP.Value = player.leaderstats1.XP.Value + 25
	for i=1,count do
		bodygyro.CFrame = CFrame.new(player.Character.Torso.Position,mouse.Hit.p)
		m = math.random(1,2)
		x = f:clone()
		x.Parent = player.Character.Torso
		x.Size = Vector3.new(rocksize,rocksize,rocksize)
		if m==1 then
			x.CFrame = f.CFrame
		elseif m==2 then
			x.CFrame = f2.CFrame
		end
		x.CFrame = CFrame.new(x.Position,mouse.Hit.p)
		local bv=Instance.new("BodyVelocity",x)
		bv.maxForce=Vector3.new(math.huge,math.huge,math.huge)
		bv.velocity=x.CFrame.lookVector*130
		local dmgv=Instance.new("IntValue",x)
		dmgv.Name="Amount_Dmg"
		dmgv.Value=damage
		local damage = script.Damage:clone()
		damage.Parent = x
		owner = Instance.new("StringValue",damage)
		owner.Value = player.Name
		owner.Name = "Owner"
		damage.Disabled = false
		game.Debris:AddItem(x,3)
		wait(0.4)
	end
	f:remove()
	f2:remove()

	wait(3)
	bodygyro:remove()
	bodypos:remove()
	player.Character.Humanoid.JumpPower = 50
	RightShoulder.C0 = value2
	LeftShoulder.C0 = value1
	wait(5)
	enabled=true
end
-----------------------------------------------ButtonUpfunction
function onButtonUp(mouse)
	hold=false
end


function onSelected(mouse)
	mouse.Button1Down:connect(function()onButtonDown(mouse)end)
	mouse.Button1Up:connect(function()onButtonUp(mouse)end)
end
script.Parent.Selected:connect(onSelected)
------------------------------------------------------End

ok i will try to find a way (it is possible) but im kinda busy rn i will reply later

by the way, where did you call the function “Charge” ?

There’s no quick fix for a game that was coded all client-side like this. Even if you use RemoteEvents to manually replicate everything, you’ll encounter the problem of changes on the server replicating back to the originating client the usual way, and competing with the local control. At this time, Roblox has no good way to do client-side procedural animation that replicates; it’s prevented by filtering-enabled, by design. There are workarounds, but they are all quite cumbersome and not guaranteed futureproof.

The best and most future-proof way to do this would be to write a script that manually samples the procedural animation frame by frame and saves out the KeyframeSequence->Keyframe->Pose hierarchy that you could publish as an Animation. This is also A LOT of work.

Personally, I would not even attempt to salvage code from a pre-FE game that was made this way. It will be less work in the end to remake the game completely from scratch–keeping the gameplay elements and art, but with 100% new code and animations. If you try to adapt the code via workarounds, it will be a struggle, and will very likely create a fragile mess of custom replication that will need regular maintenance as Roblox makes updates to how things replicate.

1 Like

Hm, okay. I can see now why the process would be too tedious.

At the end of the function ‘onButtonDown’