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

Im having trouble with filtering enabled :<?

When filtering enabled came out it ruined all my scripting knowledge (probably because all my knowledge was from reading other peoples scripts from toolbox)

I understand a bit about filtering enabled but how do i convert old scripts to work with it on?

1 comment

0

Well, from my perspective, you are converting scripts that have an impact on your game such as spawning objects, or changing things. For Example, you wanted to spawn a Brick, you would need a remote event for it.

1 answer

✓ Accepted answer
-- LocalScript

function CreatePart()
	PartCreate:FireServer(Script.Parent, BrickColor.new("Yellow") ) --Things I gotta Filter
end
-- ServerScript

PartCreate.OnServerEvent:Connect(function(Player, PartParent, PartColor)
	local Part = Instance.new("Part", Game.Workspace)
	Part.CFrame = CFrame.new(PartParent.Position) -- Filtered PartParent (script.Parent from local script)
	Part.BrickColor = PartColor -- Filtered Part Colored from local script
end)

This is my cheesy example but you filter things you want to change.

So if that Part was a bullet and I wanted to change its color midflight, Id have to add that at the PartCreate:FireServer() and input it in the ServerScript for the PartCreate.OnServerEvent.

I hope this bad example helps a bit. It really comes down to you experiementing.

1 comment

0

thanks

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