I’ve got a textbox and a button, and I’m trying to make a system where every time the player clicks the button, the thing typed into the textbox spawns in front of him. I believe I’m getting very close to making it work as most of the script itself works now and it does interact with the models it should interact with, however not quite in the right way.
You see, instead of cloning the model into the workspace, the script triggers a purchase prompt for that exact model.
...
RE.OnServerEvent:Connect(function(plr, textInput)
if repstorage.Stuff:FindFirstChild(textInput) then
local model = repstorage.Stuff:FindFirstChild(textInput)
local modelclone = model:Clone()
modelclone.Parent = workspace
modelclone:SetPrimaryPartCFrame(humroot.CFrame)
modelclone:TranslateBy(Vector3.new(5, 0, 5))
else
...
end
end)
Any ideas on what could be going wrong? The rest of the script works correctly and it’s using the right model, so I’m not sure what happened there.