Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to place a model w/FE & RemoteEvents?

Asked by 5 years ago
Edited 5 years ago

Hello, I am making it so that I can place a part already existing into the server. I am not familiar with FE, and have watched countless videos on how to get this to work. !Toolbox

Here is the code inside of LocalScript

local Tool = script.Parent
UseValue = 20

function PlaceSpike(Mouse)
    local strip = script.Parent.SpikeStrip:Clone()
    strip.Parent = workspace
    strip:MoveTo(Mouse.Hit.p)

    UseValue = UseValue - 1
        if UseValue < 1 then
        Tool:Remove()
    end
end

function Selector(Mouse)
    Mouse.Button1Down:connect(function()PlaceSpike(Mouse)end)
end

Tool.Selected:connect(Selector)

And inside of Script is nothing, since I cannot get that part. Please help me!

1 answer

Log in to vote
0
Answered by 5 years ago

You can reset the parent of the model which the model should already be in replicated storage. Also you dont need a method to call a clicked event. Just use the Activated command. And also, :Remove() is deprecated, use :Destroy() instead. You can also put the new parent in the parentheses instead of out. Just add a parameter with a comma if you want.

Ad

Answer this question