generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

What is wrong with my script?

Previous Thread :: Next Thread 
kattenverzorger is not online. kattenverzorger
Joined: 23 Nov 2013
Total Posts: 114
14 Oct 2017 01:31 PM
local sword = game.StarterPack.Sword
local character = game.Workspace.Player
local player = game.Players:GetPlayerFromCharacter(character)


sword.Part.Position = player["Left Arm"].Position


It is in a script. What i am trying to say is that it is not in a localscript.

I want that the sword's position is at the left arm's position.
Report Abuse
kattenverzorger is not online. kattenverzorger
Joined: 23 Nov 2013
Total Posts: 114
14 Oct 2017 01:39 PM
Error it is giving: Player not a valid member of workspace
Report Abuse
dryhorse2014 is not online. dryhorse2014
Joined: 28 Jan 2014
Total Posts: 727
14 Oct 2017 01:53 PM
Player isn’t a part of workspace
Report Abuse
dryhorse2014 is not online. dryhorse2014
Joined: 28 Jan 2014
Total Posts: 727
14 Oct 2017 01:54 PM
Try game.Players.player
Report Abuse
kattenverzorger is not online. kattenverzorger
Joined: 23 Nov 2013
Total Posts: 114
14 Oct 2017 01:55 PM
But how do need to change that?
Report Abuse
kattenverzorger is not online. kattenverzorger
Joined: 23 Nov 2013
Total Posts: 114
14 Oct 2017 01:57 PM
It still doesn't work. Maybe, i am thinking about it now, do i need to use the FindFirstChild() function.
Report Abuse
SinisterMemories is not online. SinisterMemories
Joined: 21 Mar 2013
Total Posts: 4892
14 Oct 2017 02:02 PM
nono, "Player" isn't inside workspace. Also if you're going to use a server script use playeradded and characteradded


local sword = game:GetService("StarterPack"):WaitForChild("Sword")
game:GetService("Players").PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
end)
end

--//I didn't define "player" and "char" since they already are defined since we are using the playeradded and characteradded argument


attempt to index global 'soul' (a nil value)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image