April 16, 2020, 6:37pm
Hello there, I was coding my script
but There is no error no function fired when I click on button
player.Character.HumanoidRootPart.CFrame = game.Workspace["Lift "..script.Parent.Name]["Floor lift"].CFrame + Vector3.new(0,1,0)
Thank for reading
April 16, 2020, 6:46pm
ClickDetectors work differently than UI buttons, in terms of what events you can use on it.
.MouseClick is a valid event.
Well then I have no Idea
Try adding vector3 to the position, not CFrame, or multiply it’s current CFrame by CFrame.new(additional CFrame)
April 16, 2020, 6:54pm
Try to use
CFrame.new() function while changing the position of the player.
April 16, 2020, 6:59pm
1 of all It’s don’t show icon of clickdetector
2 of all Any function isn’t fired
3 of all Part is concolllide = true and transparency = 0
April 16, 2020, 7:01pm
Can you show us your workspace explorer so we can see where are your things located, please.
Do .position instead of .CFrame, and your scripts would be much cleaner if you didn’t name things with spaces.
April 16, 2020, 7:23pm
What if you try to connect it with remote events? put the localscript inside startergui and connect the click detector in it on clicked then fire event from the client to script and do your thing with brick in script?
Starter gui has nothing to do with a click detector, and only a single server script is needed for click detectors.
Alright, the issue is you can disconnect the HumanoidRootPart from the body, but the rest of the character won’t follow. It’s best to use :SetPrimaryPartCFrame, which moves the full model:
player.Character:SetPrimaryPartCFrame(game.Workspace["Lift "..script.Parent.Name]["Floor lift"].CFrame + Vector3.new(0,2.5,0))
Also, I would move this into a local script, as ClickDetectors work better in that way, namely due to filtering enabled wrecking click detectors, and use a remote event.