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

Make model spawner FE compatible?

Hello I was wondering how you would make this script filtering enabled compatible. I have filtering enabled turned on, with it the script does not work Script:

bin = script.Parent

function onButton1Down(mouse)

	local model = bin.Car:clone() 
	model.Parent = game.Workspace
	model:MakeJoints()
	wait(1)
	model:MoveTo(mouse.hit.p)

end

function onSelected(mouse)
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end



bin.Selected:connect(onSelected)

This is the layout: We have a tool, and inside this tool is this script along with the model named "Car". The tool is present in the starter pack. It works without filtering enabled, but not with FE.

Thanks!

1 answer

A really short answer from a person with no time is you need is you need a RemoteEvent to fire and a server script hears it and creates the car; LocalScripts can't create things in FE.

The Wiki is useful with RemoteEvents. Also remember whenever firing from a client to the server, the player is always the first argument, then the data after.

5 comments

0

Actually localscripts can create things, it's just that anything done via a localscript is only visible to the player.

0

How do I fire it in my case? I can create a remote event in the workspace named "Car Spawner". How would I fire it to spawn the car?

0

Watch the video about remote events on alvinblox or watch this https://www.youtube.com/watch?v=4Dc_bri9mjs

0

Do you still need help? I could do my best to explain RemoteEvents if you still need help.

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