-
What do you want to achieve? Keep it simple and clear!
To move a models position, like how would you move an objects position -
What is the issue? Include screenshots / videos if possible!
Theres not really an issue, infact i attempted doing it myself few times but failed -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I cant really find anything about moving a models position, no solution so far
Tycoon = script.Parent
Door = Tycoon:WaitForChild("DoorModel").Door
Dropper = Tycoon:WaitForChild("DropperModel")
Furnace = Tycoon:WaitForChild("Furnace")
Upgrader = Tycoon:WaitForChild("Upgrader")
BuyButton = Tycoon:WaitForChild("BuyButton")
Player = game:GetService("Players")
function DropperSystem(DropHolder)
while true do
wait(1)
local DropCopy = DropHolder:WaitForChild("DropPositioner"):Clone()
DropCopy.Transparency = 0
DropCopy.Name = "Drop"
DropCopy.Anchored = false
local MoneyValue = Instance.new("NumberValue")
MoneyValue.Value = 0
MoneyValue.Name = "MoneyValue"
MoneyValue.Parent = DropCopy
DropCopy.Parent = workspace
DropCopy:SetNetworkOwner(Player:FindFirstChild(Tycoon:GetAttribute("PlayersTycoon")))
end
end
Door.Touched:Connect(function(TycoonOwner)
if Player:GetPlayerFromCharacter(TycoonOwner.Parent).OwnsATycoon.Value == not true then
Door.Transparency = 1
Door.CanTouch = false
Door.CanCollide = false
Tycoon:SetAttribute("PlayersTycoon", Player:GetPlayerFromCharacter(TycoonOwner.Parent).Name)
Player:GetPlayerFromCharacter(TycoonOwner.Parent).OwnsATycoon.Value = true
DropperSystem(Dropper)
else
end
end)
Furnace.Touched:Connect(function(Drop)
if Drop.Name == "Drop" then
local MoneyValue = Drop:FindFirstChild("MoneyValue")
Player:FindFirstChild(Tycoon:GetAttribute("PlayersTycoon")).leaderstats.Money.Value += MoneyValue.Value
Drop:Destroy()
else
end
end)
Upgrader.Touched:Connect(function(Drop)
if Drop.Name == "Drop" then
Drop.CanCollide = true
local MoneyValue = Drop:FindFirstChild("MoneyValue")
MoneyValue.Value += 30
else
end
end)
BuyButton.Touched:Connect(function()
wait(1)
if Player:FindFirstChild(Tycoon:GetAttribute("PlayersTycoon")).leaderstats.Money.Value >= 50 then
local DropperClone = Dropper:Clone()
-- this is where i set the move model code
DropperClone.Parent = Tycoon
DropperSystem(DropperClone)
end
end)
Confused? I copy the model
I then make the script make that clone move position
Feel free to talk about the other code, as im a beginner and would appreciate it