Categories > Coding > Lua >
[Help] Script Creation LT2
Posted
lt2 stores all its plots in a folder in workspace every plot (property) has an object value telling whos the owner and with a part that is called OriginSquare (for every property, will not only be origin square if property is large, each square has a part)
you could possible make it check the object value to someones name and select that property's xyz and move the xyz around for your liking. I am clueless on how i could actually make this though, any help or thoughts?
Added
i know what originframe and x y z it is but i dont know how to make the script aspect of it though. OriginFrame 383, 0, -250
Cancel
Post
Open to help anyone with anything, DM me on discord :)
Replied
What's your Discord?
Cancel
Post
Replied
I will be typing this from my phone
local name = "player name"
for i,v in pairs(game.Workspace.the parent of all plots here:GetChildren)() do
if v.Owner.Value == name then
Whatever script here
else
print("a")
end
end
Yeah script isnt correct but hopefully this gives u an idea
You can make script easier by changing all property names to the players names
im bad at explaining
Srry
Cancel
Post
Hello there
#StayHome
Replied
v:WaitForChild(Item)
Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
wait(Time2)
Drag(v[Item].Main)
wait(Time2)
v[Item].PrimaryPart.CFrame = Cframe.CFrame + Vector3.new(0,3,0)
wait(0.1)
Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
wait(Time1)
Middle one is (CFrame) the WoodRUs Counter and the other two i believe is is you it teleports you then does Drag(v[Item].Main) which drags the item, i dont know how to change where to teleport on the .Main.Position.X[Y] + 3 since when i change that number variable it crashes whenever i execute the script. i want it to go to Vector383, 0, -250 ideas?
Cancel
Post
Added
i asked my friend and he also gave up on it, do you know how to change the things in bold to choose where to go
Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3) wait(Time2) Drag(v[Item].Main) wait(Time2) v[Item].PrimaryPart.CFrame = Cframe.CFrame + Vector3.new(0,3,0) wait(0.1) Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)
The bold writing is the bit that teleports you then it drags the item with you, now you may say its just a number variable so change the 3, the whole thing crashes whenever i execute it when i do that, now the next idea would be to get rid of the
"Tlprt(v[Item].Main.Position.X + 3 ,v[Item].Main.Position.Y ,v[Item].Main.Position.Z + 3)" bit but i dont know what to replace it with perhaps something like this? i dont know i need help. This maybe? new_x = v[Item].Main.Position.X + 383 or this perhaps v[Item].main.position = vector3.new(v[Item].Main.Position.x + x, v[Item].Main.Position + y, v[Item].Main.Position+ z)
Cancel
Post
Open to help anyone with anything, DM me on discord :)
Replied
Cancel
Post
Hello there
#StayHome
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post