So I have 2 answers. Here:
Answer 1:
Just add a ClickDetector inside the part then put this code:
script.Parent.ClickDetector.MouseClick:Connect(function()
if script.Parent.Anchored ~= false then
script.Parent.Anchored = false
end
end)
It should be ServerSide and the Script is inside the block.
Answer 2:
Put a localscript inside StarterPlayerScripts and
add a RemoteEvent somewhere then
add a BoolValue that is named whatever you want so we can use that to define if we can make the part unanchored.
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.Button1Down:Connect(function()
if mouse.Target then
Event:FireServer(mouse.Target)
end
end)
Event.OnServerEvent:Connect(function(player, target)
if target:FindFirstChild("yes") then
if target.Anchored ~= false then
target.Anchored = false
end
end
end)
So the 2nd answer is kinda advance but yes hopefully I helped.:) lol
1 comment
if u put this in a normal script and not a localscript then this should work ye