bin = script.Parent
function onButton1Down(mouse)
local model = bin.TVehicle
model.Parent = game.Workspace
model:MoveTo(mouse.hit.p)
script.Parent:remove()
wait(5)
game.Workspace.TVehicle:remove()
end
function onSelected(mouse)
mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end
bin.Selected:connect(onSelected)
COMMUNITY QUESTION
Other players can't see the model. What do I do?
1 answer
The problem is that you are generating it with a localscript. In order to fix it you will need to use a serverscript and a remoteevent to trigger it on the server.
For example, I don't know if you are trying to make the vehicle appear near the player when they click but if so You can probably make this work: Fire the event from the localscript, and then do something similar to the following in the serverscript (this is an example):
local remotes = game.ReplicatedStorage
remotes.REMOTENAME.OnServerEvent:connect(function(LocalPlayer)
--make the model, whatever it is, and clone it to the local player
--such as model = game.ReplicatedStorage.MODELNAME:clone().Parent = workspace
--model:Moveto(LocalPlayer.Character.UpperTorso.Position)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Are you using a LocalScript? If yes, then that's the problem. Use a ServerScript.
hey wild idea but try taking filtering enabled into consideration o-o