Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Part tool wont change position why????

I wan't to change my handle position to a part1 position and set a part1 transparency to 1 but somehow the handle position didnt change but part1 transparency did except the other script that i got from my first question:

my localscript:

local player = game:GetService("Players")
script.Parent.Activated:Connect(function()
	script.Parent.RemoteEvent:FireServer()
end)

my serverscript:

script.Parent.OnServerEvent:Connect(function(plr)
	script.Parent.Parent.Handle.Position = Script.Parent.Parent.Part1.Position
	script.Parent.Parent.Part1.Transparency = 1
end)


the local script from my 1 question answer:

local tool = script.Parent
       local player = game:GetService("Players")
       script.Parent.Activated:Connect(function()
       script.Parent.RemoteEvent:FireServer()
end)

the script from my 1 question answer:

script.Parent.OnServerEvent:Connect(function(plr)
    plr.Backpack:FindFirstChild("Tool").Handle.Position = plr:FIndFirstChild("Tool").Part1.Position
    plr:FindFirstChild("Tool").Part1.Transparency = 1
end)

help!!

2 answers

Probably because on your serverscript on line 2 you accidentally added a capital S to the script. It should be:

script.Parent.Parent.Handle.Position = script.Parent.Parent.Part1.Position

Make sure that your ServerScripts are in somewhere like ServerScriptService. Another thing is that your RemoteEvents should be in somewhere Replicated such as ReplicatedStorage.

Now, as @floopix said, you put an uppercase S instead of a lowercase s.

This will most likely be the problem. I hope this helps you in your Scripting Career!

This discussion is preserved as it was. New answers, comments, and votes are closed.