Union is not a valid member of Player?
Ok so the teleport script I have it has to be the same name for the models but How can Union not be a vaild member of Player if it's in the model? I'm trying to get it to probably animate and I can't do game.Workspace.InstantTeleport.Union it won't work with that. So how can I animate the brick without having to do that? and not saying this Union is not a valid member of Player. Also if anyone is wounding what me is it's a variable for game.Players.LocalPlayer
001 | local me = game.Players.LocalPlayer |
002 | local locations = script.Parent:WaitForChild( "Locations" ) |
003 | local porter = script.Parent:WaitForChild( "Porter" ).Value |
004 | local groupserv = game:GetService( "GroupService" ) |
008 | local gui = script.Parent:WaitForChild( "selection" ) |
010 | function gatherLocations() |
011 | for i, v in pairs (locations:GetChildren()) do |
012 | table.insert(location, { v.Name, v.Value } ) |
017 | if (selected- 1 < = 0 ) then |
018 | return location [ #location ] |
020 | return location [ selected- 1 ] |
025 | if (selected+ 1 > #location) then |
028 | return location [ selected+ 1 ] |
032 | function loadScenery() |
035 | gui.card 1. lname.Text = b [ 1 ] |
036 | gui.cardview.lname.Text = location [ selected ] [ 1 ] |
037 | gui.card 2. lname.Text = a [ 1 ] |
038 | selloc = location [ selected ] [ 2 ] |
039 | gui.cardview.grouperror.Visible = false |
043 | if (selected+ 1 >#location) then |
046 | selected = selected + 1 |
052 | if (selected- 1 < = 0 ) then |
055 | selected = selected - 1 |
060 | gui.left.MouseButton 1 Click:connect( function () |
064 | gui.right.MouseButton 1 Click:connect( function () |
068 | gui.cancel.MouseButton 1 Click:connect( function () |
069 | local teleport = Instance.new( "IntValue" , me) |
070 | teleport.Name = "JustTeleported" |
071 | game:GetService( "Debris" ):AddItem(teleport, 5 ) |
072 | me.Character.Humanoid.WalkSpeed = 16 |
073 | porter.User.Value = nil |
074 | local Part = script.Parent.Parent.Parent.Union |
076 | me.Part.CFrame = me.Part.CFrame * CFrame.new( 0 ,- 1 , 0 ) |
079 | script.Parent:Destroy() |
082 | gui.teleport.MouseButton 1 Click:connect( function () |
083 | if not selloc then return end |
084 | if (selloc.Group.Value ~ = 0 ) then |
085 | local infoassoc = groupserv:GetGroupInfoAsync(selloc.Group.Value) |
086 | if (infoassoc and ( not me:IsInGroup(selloc.Group.Value))) then |
087 | gui.cardview.grouperror.Text = "Teleport Failed: You're not in the group \"" ..infoassoc.Name.. "\"" |
088 | gui.cardview.grouperror.Visible = true |
092 | local teleport = Instance.new( "IntValue" , me) |
093 | teleport.Name = "JustTeleported" |
094 | game:GetService( "Debris" ):AddItem(teleport, 5 ) |
097 | porter.User.Value = nil |
098 | me.Character:MoveTo(selloc.Porter.Position) |
099 | me.Character.Humanoid.WalkSpeed = 16 |
100 | local Part = script.Parent.Parent.Parent.Union |
102 | me.Part.CFrame = me.Part.CFrame * CFrame.new( 0 ,- 1 , 0 ) |
105 | script.Parent:Destroy() |